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

tools/javac/modules/EdgeCases.java fails on Windows after JDK-8297988

    XMLWordPrintable

Details

    • b28

    Backports

      Description

        The following test failed in the JDK20 CI:

        tools/javac/modules/EdgeCases.java

        Here's a snippet from the log file:

        ----------System.err:(175/8934)*----------
        test: testUnnamedPackage
        [STDOUT]:
        noModule
        [DIRECT]:
        warning: [options] bootstrap class path not set in conjunction with -source 8
        warning: [options] source value 8 is obsolete and will be removed in a future release
        warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
        warning: No SupportedSourceVersion annotation found on EdgeCases$UnnamedPackageProcessor, returning RELEASE_6.
        warning: Supported source version 'RELEASE_6' from annotation processor 'EdgeCases$UnnamedPackageProcessor' less than -source '8'
        5 warnings
        [STDOUT]:
        unnamedModule
        [DIRECT]:
        warning: No SupportedSourceVersion annotation found on EdgeCases$UnnamedPackageProcessor, returning RELEASE_6.
        warning: Supported source version 'RELEASE_6' from annotation processor 'EdgeCases$UnnamedPackageProcessor' less than -source '20'
        2 warnings
        [STDOUT]:
        m
        [DIRECT]:
        warning: No SupportedSourceVersion annotation found on EdgeCases$UnnamedPackageProcessor, returning RELEASE_6.
        warning: Supported source version 'RELEASE_6' from annotation processor 'EdgeCases$UnnamedPackageProcessor' less than -source '20'
        2 warnings
        [STDOUT]:
        null
        m1x: true
        m2x: true
        [DIRECT]:
        testUnnamedPackage\\srcNamed2\\m1x\\Test.java:1: error: unnamed package is not allowed in named modules
        public class Test {}
        ^
        testUnnamedPackage\\srcNamed2\\m2x\\Test.java:1: error: unnamed package is not allowed in named modules
        public class Test {}
        ^
        warning: No SupportedSourceVersion annotation found on EdgeCases$UnnamedPackageProcessor, returning RELEASE_6.
        warning: Supported source version 'RELEASE_6' from annotation processor 'EdgeCases$UnnamedPackageProcessor' less than -source '20'
        Note: Multiple elements named '' in modules 'm1x, m2x' were found by javax.lang.model.util.Elements.getPackageElement.
        2 errors
        2 warnings

        test: testEmptyInExportedPackage
        file explicitly specified:
        [DIRECT]:
        module-info.java:1:20: compiler.err.package.empty.or.not.found: api
        1 error
        file not specified:
        [DIRECT]:
        module-info.java:1:20: compiler.err.package.empty.or.not.found: api
        1 error

        test: testMisnamedModuleInfoClass
        [DIRECT]:
        module-info.java:1:28: compiler.err.doesnt.exist: com.example
        1 error

        test: testWrongPackageInExportedPackage
        file explicitly specified:
        [DIRECT]:
        module-info.java:1:20: compiler.err.package.empty.or.not.found: api
        1 error
        file not specified:
        [DIRECT]:
        module-info.java:1:20: compiler.err.package.empty.or.not.found: api
        1 error

        test: testDependOnUnnamedAccessibility
        compiling unnamed sources:
        compiling test module:

        test: testJustPackageInExportedPackage
        file explicitly specified:
        file not specified:

        test: testParseEnterAnalyze

        test: testStripUnknownRequired
        [STDOUT]:
        from directives:
        java.base
        from requires:
        java.base
        [DIRECT]:
        testStripUnknownRequired\\src\\test\\module-info.java:1: error: module not found: m1x
        module test { requires m1x; requires m2x; requires java.base; requires m3x; requires m4x; }
        ^
        1 error

        test: testAddExportUndefinedModule
        [DIRECT]:
        - compiler.warn.module.for.option.not.found: --add-exports, undefModule
        Test.java:1:34: compiler.err.doesnt.exist: undefPackage
        1 error
        1 warning

        test: testModuleSymbolOutterMostClass

        test: testModuleImplicitModuleBoundaries
        [DIRECT]:
        Test.java:1:52: compiler.err.not.def.access.class.intf.cant.access.reason: call(), api1.Api1, api1, (compiler.misc.not.def.access.does.not.read: m3x, api1, m1x)
        Test.java:1:76: compiler.err.not.def.access.class.intf.cant.access: toString(), java.lang.Object
        2 errors

        test: testAssignClassToAutomaticModule

        test: testClassPackageClash
        [DIRECT]:
        m1x.java:2:8: compiler.err.clash.with.pkg.of.same.name: kindname.class, test.m1x
        1 error

        test: testEmptyImplicitModuleInfo
        [DIRECT]:
        - compiler.err.cant.access: module-info, (compiler.misc.bad.source.file.header: module-info.java, (compiler.misc.file.does.not.contain.module))
        1 error

        test: testImplicitJavaBase
        [DIRECT]:
        - compiler.err.cant.access: <error>.module-info, (compiler.misc.bad.class.file.header: module-info.class, (compiler.misc.illegal.start.of.class.file))
        1 error
        [DIRECT]:
        - compiler.err.cant.access: module-info, (compiler.misc.bad.source.file.header: module-info.java, (compiler.misc.file.does.not.contain.module))
        1 error

        test: testModuleInfoNameMismatchSource
        [DIRECT]:
        module-info.java:1:1: compiler.err.module.name.mismatch: other, m1x
        - compiler.err.cant.access: m1x.module-info, (compiler.misc.cant.resolve.modules)
        2 errors

        test: testModuleInfoNameMismatchClass
        [DIRECT]:
        - compiler.err.cant.access: m1x.module-info, (compiler.misc.bad.class.file.header: module-info.class, (compiler.misc.module.name.mismatch: other, m1x))
        module-info.java:1:1: compiler.err.module.not.found: m1x
        2 errors

        test: testGetDirectivesComplete

        test: testPackageInModuleInfo
        [DIRECT]:
        module-info.java:1:1: compiler.err.no.pkg.in.module-info.java
        1 error

        test: testOnDemandCompletionModuleInfoJava
        [DIRECT]:
        module-info.java:1:23: compiler.warn.has.been.deprecated.module: m1x
        module-info.java:1:37: compiler.warn.has.been.deprecated.module: m1x
        2 warnings

        test: testInvisibleClassVisiblePackageClash

        test: testExportedNameCheckFromSourceNoEvent
        Exception running test testExportedNameCheckFromSourceNoEvent: java.lang.AssertionError: Unexpected log, got: [COMPILATION:started:<none>, PARSE:started:testExportedNameCheckFromSourceNoEvent\\src\\m\\module-info.java, PARSE:finished:testExportedNameCheckFromSourceNoEvent\\src\\m\\module-info.java, ENTER:started:testExportedNameCheckFromSourceNoEvent\\src\\m\\module-info.java, ENTER:finished:testExportedNameCheckFromSourceNoEvent\\src\\m\\module-info.java, ANALYZE:started:testExportedNameCheckFromSourceNoEvent\\src\\m\\module-info.java, ANALYZE:finished:testExportedNameCheckFromSourceNoEvent\\src\\m\\module-info.java, COMPILATION:finished:<none>], expected: [COMPILATION:started:<none>, PARSE:started:testExportedNameCheckFromSourceNoEvent/src/m/module-info.java, PARSE:finished:testExportedNameCheckFromSourceNoEvent/src/m/module-info.java, ENTER:started:testExportedNameCheckFromSourceNoEvent/src/m/module-info.java, ENTER:finished:testExportedNameCheckFromSourceNoEvent/src/m/module-info.java, ANALYZE:started:testExportedNameCheckFromSourceNoEvent/src/m/module-info.java, ANALYZE:finished:testExportedNameCheckFromSourceNoEvent/src/m/module-info.java, COMPILATION:finished:<none>]
        java.lang.AssertionError: Unexpected log, got: [COMPILATION:started:<none>, PARSE:started:testExportedNameCheckFromSourceNoEvent\\src\\m\\module-info.java, PARSE:finished:testExportedNameCheckFromSourceNoEvent\\src\\m\\module-info.java, ENTER:started:testExportedNameCheckFromSourceNoEvent\\src\\m\\module-info.java, ENTER:finished:testExportedNameCheckFromSourceNoEvent\\src\\m\\module-info.java, ANALYZE:started:testExportedNameCheckFromSourceNoEvent\\src\\m\\module-info.java, ANALYZE:finished:testExportedNameCheckFromSourceNoEvent\\src\\m\\module-info.java, COMPILATION:finished:<none>], expected: [COMPILATION:started:<none>, PARSE:started:testExportedNameCheckFromSourceNoEvent/src/m/module-info.java, PARSE:finished:testExportedNameCheckFromSourceNoEvent/src/m/module-info.java, ENTER:started:testExportedNameCheckFromSourceNoEvent/src/m/module-info.java, ENTER:finished:testExportedNameCheckFromSourceNoEvent/src/m/module-info.java, ANALYZE:started:testExportedNameCheckFromSourceNoEvent/src/m/module-info.java, ANALYZE:finished:testExportedNameCheckFromSourceNoEvent/src/m/module-info.java, COMPILATION:finished:<none>]
        at EdgeCases.testExportedNameCheckFromSourceNoEvent(EdgeCases.java:1147)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
        at java.base/java.lang.reflect.Method.invoke(Method.java:578)
        at toolbox.TestRunner.runTests(TestRunner.java:89)
        at ModuleTestBase.runTests(ModuleTestBase.java:49)
        at EdgeCases.main(EdgeCases.java:85)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
        at java.base/java.lang.reflect.Method.invoke(Method.java:578)
        at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:312)
        at java.base/java.lang.Thread.run(Thread.java:1623)

        22 tests, 1 errors
        java.lang.Exception: 1 errors found
        at toolbox.TestRunner.runTests(TestRunner.java:116)
        at ModuleTestBase.runTests(ModuleTestBase.java:49)
        at EdgeCases.main(EdgeCases.java:85)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
        at java.base/java.lang.reflect.Method.invoke(Method.java:578)
        at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:312)
        at java.base/java.lang.Thread.run(Thread.java:1623)

        JavaTest Message: Test threw exception: java.lang.Exception
        JavaTest Message: shutting down test

        result: Failed. Execution failed: `main' threw exception: java.lang.Exception: 1 errors found

        Attachments

          Issue Links

            Activity

              People

                jlahoda Jan Lahoda
                jlahoda Jan Lahoda
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: