test/hotspot/jtreg/runtime/appcds/jigsaw/modulepath/AddOpens.java
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File open Cdiff test/hotspot/jtreg/runtime/appcds/jigsaw/modulepath/AddOpens.java

test/hotspot/jtreg/runtime/appcds/jigsaw/modulepath/AddOpens.java

Print this page

        

*** 88,110 **** OutputAnalyzer output = TestCommon.createArchive( destJar.toString(), appClasses, "-Xlog:class+load=trace", "-XX:+PrintSystemDictionaryAtExit", "--module-path", moduleDir.toString(), "-m", TEST_MODULE1); ! TestCommon.checkExecReturn(output, 0, true, "Loading classes to share"); // run with the archive using the same command line as in dump time // plus the "--add-opens java.base/java.lang=com.simple" option. // The main class should be loaded from the archive. // The setaccessible(true) on the ClassLoader.defineClass method should // be successful. ! output = TestCommon.execCommon( "-Xlog:class+load=trace", "-cp", destJar.toString(), "--add-opens", "java.base/java.lang=" + TEST_MODULE1, "--module-path", moduleDir.toString(), ! "-m", TEST_MODULE1, "with_add_opens"); ! TestCommon.checkExecReturn(output, 0, true, "[class,load] com.simple.Main source: shared objects file", "method.setAccessible succeeded!"); } } --- 88,110 ---- OutputAnalyzer output = TestCommon.createArchive( destJar.toString(), appClasses, "-Xlog:class+load=trace", "-XX:+PrintSystemDictionaryAtExit", "--module-path", moduleDir.toString(), "-m", TEST_MODULE1); ! TestCommon.checkDump(output); // run with the archive using the same command line as in dump time // plus the "--add-opens java.base/java.lang=com.simple" option. // The main class should be loaded from the archive. // The setaccessible(true) on the ClassLoader.defineClass method should // be successful. ! TestCommon.run( "-Xlog:class+load=trace", "-cp", destJar.toString(), "--add-opens", "java.base/java.lang=" + TEST_MODULE1, "--module-path", moduleDir.toString(), ! "-m", TEST_MODULE1, "with_add_opens") ! .assertNormalExit( "[class,load] com.simple.Main source: shared objects file", "method.setAccessible succeeded!"); } }
test/hotspot/jtreg/runtime/appcds/jigsaw/modulepath/AddOpens.java
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File