--- old/test/hotspot/jtreg/runtime/appcds/javaldr/CheckAnonymousClass.java 2018-04-18 09:44:41.746927915 -0700 +++ new/test/hotspot/jtreg/runtime/appcds/javaldr/CheckAnonymousClass.java 2018-04-18 09:44:41.070864187 -0700 @@ -41,8 +41,10 @@ String appJar = TestCommon.getTestJar("hello.jar"); - TestCommon.dump(appJar, TestCommon.list("Hello", "org/omg/CORBA/ORB"), - "--add-modules", "java.corba", "-Xlog:class+load=info"); + TestCommon.dump(appJar, + TestCommon.list("Hello", + "javax/annotation/processing/FilerException"), // from java.compiler module + "-Xlog:class+load=info"); String prefix = ".class.load. "; // class name pattern like the following: @@ -53,13 +55,13 @@ String pattern = prefix + class_pattern + suffix; // during run time, anonymous classes shouldn't be loaded from the archive TestCommon.run("-XX:+UnlockDiagnosticVMOptions", - "-cp", appJar, "-Xlog:class+load=info", "--add-modules", "java.corba", "Hello") + "-cp", appJar, "-Xlog:class+load=info", "Hello") .assertNormalExit(output -> output.shouldNotMatch(pattern)); // inspect the archive and make sure no anonymous class is in there TestCommon.run("-XX:+UnlockDiagnosticVMOptions", "-cp", appJar, "-Xlog:class+load=info", "-XX:+PrintSharedArchiveAndExit", - "-XX:+PrintSharedDictionary", "--add-modules", "java.corba", "Hello") + "-XX:+PrintSharedDictionary", "Hello") .assertNormalExit(output -> output.shouldNotMatch(class_pattern)); } }