JDK 8159439: NPEForModuleInfoWithNonZeroSuperClassTest updated

B. Blaser bsrbnd at gmail.com
Thu Mar 16 12:20:48 UTC 2017


Hi,

I've noticed that running the javac tests using the "jtreg" target of
"build.xml" seems not to take care of the "ProblemList.txt" (is this
normal?). For example,
tools/javac/modules/T8159439/NPEForModuleInfoWithNonZeroSuperClassTest.java
is run and fails (but not with the expected output)...

Nevertheless, the reason why it's on the problem list seems to be
outdated as asmtools 6.0 includes the module handling. But a recent
change in com.sun.tools.javac.jvm.ModuleNameReader.readModuleName()
checks the "super_class" field when reading the module name. Which
makes this test fail with another message as the expected one.

I think this test could probably be removed from the "ProblemList.txt"
and the expected output updated as below. Any comment is welcome.

Thanks,
Bernard

diff --git a/test/tools/javac/modules/T8159439/NPEForModuleInfoWithNonZeroSuperClassTest.out
b/test/tools/javac/modules/T8159439/NPEForModuleInfoWithNonZeroSuperClassTest.out
--- a/test/tools/javac/modules/T8159439/NPEForModuleInfoWithNonZeroSuperClassTest.out
+++ b/test/tools/javac/modules/T8159439/NPEForModuleInfoWithNonZeroSuperClassTest.out
@@ -1,2 +1,2 @@
-- compiler.err.cant.access: mod.module-info,
(compiler.misc.bad.class.file.header: module-info.class,
(compiler.misc.module.info.invalid.super.class))
+- compiler.err.cant.access: <error>.module-info,
(compiler.misc.bad.class.file.header: module-info.class,
(compiler.misc.module.name.mismatch: mod/module-info, <error>))
 1 error


More information about the compiler-dev mailing list