Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8047675

tools/javac/defaultMethods/Assertions.java fails if run with -enableassertions (-ea)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 9
    • tools
    • b30
    • Verified

        tools/javac/defaultMethods/Assertions.java fails if run with jtreg -enableassertions (-ea) option.

        To reproduce:
        jtreg -ea -jdk:$TEST_JAVA langtools/test/tools/javac/defaultMethods/Assertions.java

        STDERR:
        java.lang.IllegalStateException: AssertionError not expected, but thrown.
        at test.Assertions.main(Assertions.java:74)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:484)
        at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:94)
        at java.lang.Thread.run(Thread.java:745)

        JavaTest Message: Test threw exception: java.lang.IllegalStateException: AssertionError not expected, but thrown.
        JavaTest Message: shutting down test

        STATUS:Failed.`main' threw exception: java.lang.IllegalStateException: AssertionError not expected, but thrown.


        jtreg, version 4.1 fcs b09

        java version "1.9.0-ea"
        Java(TM) SE Runtime Environment (build 1.9.0-ea-b19)
        Java HotSpot(TM) 64-Bit Server VM (build 1.9.0-ea-b19, mixed mode)

              jlahoda Jan Lahoda
              amlu Amy Lu (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: