Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-2016

TestCases failure as expected exception is not thrown inside try block

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 11.0
    • java - Hints
    • None

    Description

      Below TestCases failed with Error:

      testSingleParentException(org.netbeans.modules.java.hints.bugs.BroadCatchBlockTest)
      testCommonParentsWithoutUmbrellas(org.netbeans.modules.java.hints.bugs.BroadCatchBlockTest)
      testTwoCommonParentFixMultiCatch(org.netbeans.modules.java.hints.bugs.BroadCatchBlockTest) 
      testCommonParentSuppressed(org.netbeans.modules.java.hints.bugs.BroadCatchBlockTest) 
      testTwoSubexceptionsGeneric(org.netbeans.modules.java.hints.bugs.BroadCatchBlockTest) 
      testTwoCommonParentFixSeparateCatches(org.netbeans.modules.java.hints.bugs.BroadCatchBlockTest) 
      testTwoSubexceptionsGeneric7(org.netbeans.modules.java.hints.bugs.BroadCatchBlockTest) 
      testUmbrellaWithOneSubtype(org.netbeans.modules.java.hints.bugs.BroadCatchBlockTest) 
      testRecordExceptionsFromNoArgMethod(org.netbeans.modules.java.hints.bugs.NPECheckTest) 
      testThrowableAssignedToExceptionParameter(org.netbeans.modules.java.hints.bugs.ThrowableNotThrownTest) 
      testMethodInvokedOnThrowable(org.netbeans.modules.java.hints.bugs.ThrowableNotThrownTest) 
      testThrowableCompared(org.netbeans.modules.java.hints.bugs.ThrowableNotThrownTest) 
      testGetCauseAloneReported(org.netbeans.modules.java.hints.bugs.ThrowableNotThrownTest) 
      testGetCausePassedOn(org.netbeans.modules.java.hints.bugs.ThrowableNotThrownTest) 
      test203139(org.netbeans.modules.java.hints.jdk.JoinCatchesTest) 
      test234085(org.netbeans.modules.java.hints.jdk.JoinCatchesTest) 
      test224028(org.netbeans.modules.java.hints.bugs.NPECheckTest) 
      testSimpleFlow(org.netbeans.modules.java.hints.jdk.ConvertToStringSwitchTest) 
      testSimpleNoStringArgNotStrict(org.netbeans.modules.java.hints.jdk.ThrowableInitCauseTest) 
      testSimpleNoStringArgStrict(org.netbeans.modules.java.hints.jdk.ThrowableInitCauseTest) 
      testSimple1(org.netbeans.modules.java.hints.jdk.ThrowableInitCauseTest) 
      testSimple2(org.netbeans.modules.java.hints.jdk.ThrowableInitCauseTest) 
      testSimple3(org.netbeans.modules.java.hints.jdk.ThrowableInitCauseTest) 
      testExpression(org.netbeans.modules.java.hints.jdk.ThrowableInitCauseTest) 
      testFinalVariable(org.netbeans.modules.java.hints.jdk.ThrowableInitCauseTest) 
      testHintPosFinally(org.netbeans.modules.java.hints.jdk.UseSpecificCatchTest) 
      testParametrizedTypeException(org.netbeans.modules.java.hints.jdk.UseSpecificCatchTest)

       

      Sample Error Description:

       

      Testcase: testGetCauseAloneReported(org.netbeans.modules.java.hints.bugs.ThrowableNotThrownTest): Caused an ERROR
      9:5 exception InvocationTargetException is never thrown in body of corresponding try statement
      java.lang.AssertionError: 9:5 exception InvocationTargetException is never thrown in body of corresponding try statement
      at org.netbeans.modules.java.hints.test.api.HintTest.ensureCompilable(HintTest.java:379)
      at org.netbeans.modules.java.hints.test.api.HintTest.run(HintTest.java:458)
      at org.netbeans.modules.java.hints.test.api.HintTest.run(HintTest.java:443)
      at org.netbeans.modules.java.hints.bugs.ThrowableNotThrownTest.testGetCauseAloneReported(ThrowableNotThrownTest.java:230)

      Attachments

        1. netbeans-2016.patch
          0.5 kB
          ARUNAVA SINHA

        Activity

          People

            arunava.sinha ARUNAVA SINHA
            arunava.sinha ARUNAVA SINHA
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: