JDK-8178335 : fake pass: jdk/internal/ref/Cleaner/ExitOnThrow.java
  • Type: Bug
  • Component: core-libs
  • Affected Version: 9,10
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2017-04-07
  • Updated: 2019-04-16
  • Resolved: 2019-04-03
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 13
13 b15Fixed
Related Reports
Relates :  
Description
Problems noticed while executing or getting dependences

Failed with limited modules, passed with full JDK.
Package does not exist in line: import javax.tools.JavaCompiler.CompilationTask;
Cannot find symbol in line: private static CompilationTask getCompilationTask(MemoryJavaFileObject file, String... options) {
Cannot find symbol in line: public JavaFileObject getJavaFileForOutput(Location location, String className,
Cannot find symbol in line: Kind kind, FileObject sibling)
Cannot find symbol in line: super(URI.create("string:///" + className.replace('.','/') + Kind.SOURCE.extension), Kind.SOURCE);
Cannot find symbol in line: CompilationTask task = getCompilationTask(file, options);
Dependency on java.compiler is not declared
Dependency on java.management is not declared
Dependency on jdk.management is not declared
Comments
RFR: http://mail.openjdk.java.net/pipermail/core-libs-dev/2019-April/059474.html
02-04-2019

Fake pass, test need to be fixed. It expects the target test program exists with '1', and throws an exception. Due to the target test program be wrongly forked (missed --add-exports ), it exists with '1' but with unexpected error: stdout: [] stderr: [Exception in thread "main" java.lang.IllegalAccessError: class ExitOnThrow (in unnamed module @0x4d7e1886) cannot access class jdk.internal.ref.Cleaner (in module java.base) because module java.base does not export jdk.internal.ref to unnamed module @0x4d7e1886 at ExitOnThrow.main(ExitOnThrow.java:72) ] exitValue = 1
02-04-2019

Patch File: diff -r 06c0fc35adcf test/jdk/internal/ref/Cleaner/ExitOnThrow.java --- a/test/jdk/internal/ref/Cleaner/ExitOnThrow.java Tue May 02 10:34:22 2017 -0700 +++ b/test/jdk/internal/ref/Cleaner/ExitOnThrow.java Fri May 05 21:45:05 2017 +0000 @@ -24,20 +24,19 @@ /* * @test * @bug 4954921 8009259 - * @library /test/lib + * @library /lib/testlibrary * @modules java.base/jdk.internal.ref * java.base/jdk.internal.misc - * @build jdk.test.lib.* - * @build jdk.test.lib.process.* + * @build jdk.testlibrary.JDKToolLauncher jdk.testlibrary.OutputAnalyzer jdk.testlibrary.ProcessTools * @run main ExitOnThrow * @summary Ensure that if a cleaner throws an exception then the VM exits */ import java.util.Arrays; import jdk.internal.ref.Cleaner; -import jdk.test.lib.JDKToolLauncher; -import jdk.test.lib.process.OutputAnalyzer; -import jdk.test.lib.process.ProcessTools; +import jdk.testlibrary.JDKToolLauncher; +import jdk.testlibrary.OutputAnalyzer; +import jdk.testlibrary.ProcessTools; public class ExitOnThrow {
05-05-2017