mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 23:34:52 +02:00
8168797: do not load any archived classes from a patched module
Add new runtime shared class visibility check to ensure shared classes from patched module are not loaded at runtime. Reviewed-by: acorn, ccheung, hseigel, iklam, lfoltan
This commit is contained in:
parent
a601028e0f
commit
bae7bbd382
9 changed files with 31 additions and 210 deletions
|
@ -52,7 +52,7 @@ public class PatchModuleCDS {
|
|||
new OutputAnalyzer(pb.start())
|
||||
.shouldContain("ro space:"); // Make sure archive got created.
|
||||
|
||||
// Case 2: Test that only jar file in --patch-module is supported for CDS dumping
|
||||
// Case 2: Test that directory in --patch-module is supported for CDS dumping
|
||||
// Create a class file in the module java.base.
|
||||
String source = "package javax.naming.spi; " +
|
||||
"public class NamingManager { " +
|
||||
|
@ -73,7 +73,7 @@ public class PatchModuleCDS {
|
|||
"-Xlog:class+path=info",
|
||||
"-version");
|
||||
new OutputAnalyzer(pb.start())
|
||||
.shouldContain("--patch-module requires a regular file during dumping");
|
||||
.shouldContain("ro space:"); // Make sure archive got created.
|
||||
|
||||
// Case 3a: Test CDS dumping with jar file in --patch-module
|
||||
BasicJarBuilder.build("javanaming", "javax/naming/spi/NamingManager");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue