--- old/test/hotspot/jtreg/ProblemList.txt 2018-04-18 09:44:33.960193906 -0700 +++ new/test/hotspot/jtreg/ProblemList.txt 2018-04-18 09:44:33.357137059 -0700 @@ -97,12 +97,6 @@ # Java EE Module Removal # -runtime/appcds/jigsaw/classpathtests/ClassPathTests.java 8194310 generic-all Java EE Module Removal -runtime/appcds/jigsaw/overridetests/OverrideTests.java 8194310 generic-all Java EE Module Removal -runtime/SharedArchiveFile/BootAppendTests.java 8194310 generic-all Java EE Module Removal runtime/modules/PatchModule/PatchModuleClassList.java 8194310 generic-all Java EE Module Removal compiler/c2/Test8007294.java 8194310 generic-all Java EE Module Removal compiler/c2/Test6852078.java 8194310 generic-all Java EE Module Removal -runtime/AppCDS/HelloExtTest.java 8194310 generic-all Java EE Module Removal -runtime/AppCDS/javaldr/CheckAnonymousClass.java 8194310 generic-all Java EE Module Removal -runtime/appcds/jigsaw/classpathtests/DummyClassesInBootClassPath.java 8194310 generic-all Java EE Module Removal --- old/test/hotspot/jtreg/runtime/SharedArchiveFile/BootAppendTests.java 2018-04-18 09:44:36.676449951 -0700 +++ new/test/hotspot/jtreg/runtime/SharedArchiveFile/BootAppendTests.java 2018-04-18 09:44:36.017387825 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,7 +31,7 @@ * java.management * jdk.internal.jvmstat/sun.jvmstat.monitor * @compile javax/sound/sampled/MyClass.jasm - * @compile org/omg/CORBA/Context.jasm + * @compile javax/annotation/processing/FilerException.jasm * @compile nonjdk/myPackage/MyClass.java * @build LoadClass * @run main/othervm BootAppendTests @@ -53,7 +53,8 @@ public class BootAppendTests { private static final String APP_CLASS = "LoadClass"; private static final String BOOT_APPEND_MODULE_CLASS = "javax/sound/sampled/MyClass"; - private static final String BOOT_APPEND_DUPLICATE_MODULE_CLASS = "org/omg/CORBA/Context"; + private static final String BOOT_APPEND_DUPLICATE_MODULE_CLASS = + "javax/annotation/processing/FilerException"; private static final String BOOT_APPEND_CLASS = "nonjdk/myPackage/MyClass"; private static final String BOOT_APPEND_MODULE_CLASS_NAME = BOOT_APPEND_MODULE_CLASS.replace('/', '.'); @@ -141,21 +142,21 @@ // from -Xbootclasspath/a. Verify the behavior is the same at runtime // when CDS is enabled. // - // The org.omg.CORBA.Context is a boot module class. The class on - // the -Xbootclasspath/a path that has the same fully-qualified name - // should not be loaded at runtime when CDS is enabled. - // The one from the boot modules should be loaded instead. + // The javax/annotation/processing/FilerException is a platform module + // class. The class on the -Xbootclasspath/a path that has the same + // fully-qualified name should not be loaded at runtime when CDS is enabled. + // The one from the platform modules should be loaded instead. public static void testBootAppendDuplicateModuleClass() throws Exception { for (String mode : modes) { CDSOptions opts = (new CDSOptions()) .setXShareMode(mode).setUseVersion(false) - .addPrefix("--add-modules", "java.corba", "-showversion", + .addPrefix("-showversion", "-Xbootclasspath/a:" + bootAppendJar, "-cp", appJar) .addSuffix("-Xlog:class+load=info", APP_CLASS, BOOT_APPEND_DUPLICATE_MODULE_CLASS_NAME); OutputAnalyzer out = CDSTestUtils.runWithArchive(opts); - CDSTestUtils.checkExec(out, opts, "[class,load] org.omg.CORBA.Context source: jrt:/java.corba"); + CDSTestUtils.checkExec(out, opts, "[class,load] javax.annotation.processing.FilerException source: jrt:/java.compiler"); } } @@ -164,9 +165,9 @@ // using --limit-modules. Verify the behavior is the same at runtime when CDS // is enabled. // - // The java.desktop module is excluded using --limit-modules at runtime, - // javax.sound.sampled.MyClass is archived from -Xbootclasspath/a. It can be - // loaded from the archive at runtime. + // The java.desktop module is excluded using --limit-modules at runtime + // CDS will be disabled with the --limit-modules option during runtime. + // javax.sound.sampled.MyClass will be loaded from the jar at runtime. public static void testBootAppendExcludedModuleClass() throws Exception { for (String mode : modes) { CDSOptions opts = (new CDSOptions()) @@ -175,13 +176,18 @@ "--limit-modules=java.base", "-cp", appJar) .addSuffix("-Xlog:class+load=info", APP_CLASS, BOOT_APPEND_MODULE_CLASS_NAME); - - OutputAnalyzer out = CDSTestUtils.runWithArchive(opts); - CDSTestUtils.checkExec(out, opts, "[class,load] javax.sound.sampled.MyClass"); - - // When CDS is enabled, the shared class should be loaded from the archive. + CDSTestUtils.Result res = CDSTestUtils.run(opts); + String MATCH_PATTERN = + ".class.load. javax.sound.sampled.MyClass source:.*bootAppend.jar*"; if (mode.equals("on")) { - CDSTestUtils.checkExec(out, opts, "[class,load] javax.sound.sampled.MyClass source: shared objects file"); + res.assertSilentlyDisabledCDS(out -> { + out.shouldHaveExitValue(0) + .shouldMatch(MATCH_PATTERN); + }); + } else { + res.assertNormalExit(out -> { + out.shouldMatch(MATCH_PATTERN); + }); } } } @@ -192,10 +198,12 @@ // --limit-modules. Verify the behavior is the same at runtime // when CDS is enabled. // - // The org.omg.CORBA.Context is a boot module class. The class - // on -Xbootclasspath/a that has the same fully-qualified name - // as org.omg.CORBA.Context can be loaded at runtime when - // java.corba is excluded. + // The javax.annotation.processing.FilerException is a platform module class. + // The class on -Xbootclasspath/a that has the same fully-qualified name + // as javax.annotation.processing.FilerException can be loaded at runtime when + // java.compiler is excluded. + // CDS is disabled during runtime if the --limit-modules option is + // specified. public static void testBootAppendDuplicateExcludedModuleClass() throws Exception { for (String mode : modes) { CDSOptions opts = (new CDSOptions()) @@ -205,14 +213,18 @@ .addSuffix("-Xlog:class+load=info", APP_CLASS, BOOT_APPEND_DUPLICATE_MODULE_CLASS_NAME); - OutputAnalyzer out = CDSTestUtils.runWithArchive(opts); - CDSTestUtils.checkExec(out, opts, "[class,load] org.omg.CORBA.Context"); - if (!CDSTestUtils.isUnableToMap(out)) { - if (mode.equals("off")) { - out.shouldMatch(".*\\[class,load\\] org.omg.CORBA.Context source:.*bootAppend.jar"); - } else { - CDSTestUtils.checkExec(out, opts, "[class,load] org.omg.CORBA.Context source: shared objects file"); - } + CDSTestUtils.Result res = CDSTestUtils.run(opts); + String MATCH_PATTERN = + ".class.load. javax.annotation.processing.FilerException source:.*bootAppend.jar*"; + if (mode.equals("on")) { + res.assertSilentlyDisabledCDS(out -> { + out.shouldHaveExitValue(0) + .shouldMatch(MATCH_PATTERN); + }); + } else { + res.assertNormalExit(out -> { + out.shouldMatch(MATCH_PATTERN); + }); } } } @@ -222,8 +234,9 @@ // the same at runtime when CDS is enabled. // // The nonjdk.myPackage is not defined in named modules. The - // archived nonjdk.myPackage.MyClass from -Xbootclasspath/a - // can be loaded at runtime when CDS is enabled. + // nonjdk.myPackage.MyClass will be loaded from the jar in + // -Xbootclasspath/a since CDS will be disabled with the + // --limit-modules option. public static void testBootAppendClass() throws Exception { for (String mode : modes) { CDSOptions opts = (new CDSOptions()) @@ -233,21 +246,26 @@ .addSuffix("-Xlog:class+load=info", APP_CLASS, BOOT_APPEND_CLASS_NAME); - OutputAnalyzer out = CDSTestUtils.runWithArchive(opts); - CDSTestUtils.checkExec(out, opts, "[class,load] nonjdk.myPackage.MyClass"); - - // If CDS is enabled, the nonjdk.myPackage.MyClass should be loaded - // from the shared archive. + CDSTestUtils.Result res = CDSTestUtils.run(opts); + String MATCH_PATTERN = + ".class.load. nonjdk.myPackage.MyClass source:.*bootAppend.jar*"; if (mode.equals("on")) { - CDSTestUtils.checkExec(out, opts, - "[class,load] nonjdk.myPackage.MyClass source: shared objects file"); + res.assertSilentlyDisabledCDS(out -> { + out.shouldHaveExitValue(0) + .shouldMatch(MATCH_PATTERN); + }); + } else { + res.assertNormalExit(out -> { + out.shouldMatch(MATCH_PATTERN); + }); } } } // Test #6: This is similar to Test #5. During runtime, an extra dir // is appended to the bootclasspath. It should not invalidate - // the shared archive. + // the shared archive. However, CDS will be disabled with the + // --limit-modules in the command line. public static void testBootAppendExtraDir() throws Exception { for (String mode : modes) { CDSOptions opts = (new CDSOptions()) @@ -257,14 +275,18 @@ .addSuffix("-Xlog:class+load=info", APP_CLASS, BOOT_APPEND_CLASS_NAME); - OutputAnalyzer out = CDSTestUtils.runWithArchive(opts); - CDSTestUtils.checkExec(out, opts, "[class,load] nonjdk.myPackage.MyClass"); - - // If CDS is enabled, the nonjdk.myPackage.MyClass should be loaded - // from the shared archive. + CDSTestUtils.Result res = CDSTestUtils.run(opts); + String MATCH_PATTERN = + ".class.load. nonjdk.myPackage.MyClass source:.*bootAppend.jar*"; if (mode.equals("on")) { - CDSTestUtils.checkExec(out, opts, - "[class,load] nonjdk.myPackage.MyClass source: shared objects file"); + res.assertSilentlyDisabledCDS(out -> { + out.shouldHaveExitValue(0) + .shouldMatch(MATCH_PATTERN); + }); + } else { + res.assertNormalExit(out -> { + out.shouldMatch(MATCH_PATTERN); + }); } } } --- old/test/hotspot/jtreg/runtime/appcds/HelloExtTest.java 2018-04-18 09:44:39.494715613 -0700 +++ new/test/hotspot/jtreg/runtime/appcds/HelloExtTest.java 2018-04-18 09:44:38.891658766 -0700 @@ -51,8 +51,8 @@ String bootClassPath = "-Xbootclasspath/a:" + whiteBoxJar; TestCommon.dump(appJar, - TestCommon.list("org/omg/CORBA/ORB", "[Ljava/lang/Comparable;"), - bootClassPath, "-verbose:class", "--add-modules", "java.corba"); + TestCommon.list("javax/annotation/processing/FilerException", "[Ljava/lang/Comparable;"), + bootClassPath, "-verbose:class"); String prefix = ".class.load. "; String class_pattern = ".*LambdaForm[$]MH[/][0123456789].*"; @@ -60,14 +60,14 @@ String pattern = prefix + class_pattern + suffix; TestCommon.run("-XX:+UnlockDiagnosticVMOptions", "-XX:+WhiteBoxAPI", - "-cp", appJar, bootClassPath, "-verbose:class", "--add-modules", "java.corba", "HelloExt") + "-cp", appJar, bootClassPath, "-verbose:class", "HelloExt") .assertNormalExit(output -> output.shouldNotMatch(pattern)); TestCommon.run("-XX:+UnlockDiagnosticVMOptions", "-XX:+WhiteBoxAPI", "-cp", appJar, bootClassPath, "-verbose:class", "-XX:+PrintSharedArchiveAndExit", "-XX:+PrintSharedDictionary", - "--add-modules", "java.corba", "HelloExt") + "HelloExt") .assertNormalExit(output -> output.shouldNotMatch(class_pattern)); } } --- 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)); } } --- old/test/hotspot/jtreg/runtime/appcds/jigsaw/classpathtests/BootAppendTests.java 2018-04-18 09:44:44.172156527 -0700 +++ new/test/hotspot/jtreg/runtime/appcds/jigsaw/classpathtests/BootAppendTests.java 2018-04-18 09:44:43.485091762 -0700 @@ -32,7 +32,7 @@ * jdk.jartool/sun.tools.jar * jdk.internal.jvmstat/sun.jvmstat.monitor * @compile src/jdk/test/Main.java - * @compile src/com/sun/tools/javac/Main2.jasm + * @compile src/com/sun/tools/javac/MyMain.jasm * @compile src/sun/nio/cs/ext/MyClass.java * @compile src/sun/nio/cs/ext1/MyClass.java * @run main BootAppendTests @@ -52,7 +52,7 @@ private static final Path CLASSES_DIR = Paths.get("classes"); private static final String MAIN_CLASS = "jdk.test.Main"; - private static final String APP_MODULE_CLASS = "com/sun/tools/javac/Main2"; + private static final String APP_MODULE_CLASS = "com/sun/tools/javac/MyMain"; private static final String BOOT_APPEND_MODULE_CLASS = "sun/nio/cs/ext/MyClass"; private static final String BOOT_APPEND_CLASS = "sun/nio/cs/ext1/MyClass"; private static final String[] ARCHIVE_CLASSES = @@ -239,7 +239,7 @@ MAIN_CLASS, "Test #9", APP_MODULE_CLASS, "true", "BOOT") .assertSilentlyDisabledCDS(out -> { out.shouldHaveExitValue(0) - .shouldMatch(".class.load. com.sun.tools.javac.Main2 source:.*bootAppend.jar"); + .shouldMatch(".class.load. com.sun.tools.javac.MyMain source:.*bootAppend.jar"); }); } @@ -253,7 +253,7 @@ MAIN_CLASS, "Test #10", APP_MODULE_CLASS, "true", "BOOT") .assertSilentlyDisabledCDS(out -> { out.shouldHaveExitValue(0) - .shouldMatch(".class.load. com.sun.tools.javac.Main2 source:.*bootAppend.jar"); + .shouldMatch(".class.load. com.sun.tools.javac.MyMain source:.*bootAppend.jar"); }); } } --- old/test/hotspot/jtreg/runtime/appcds/jigsaw/classpathtests/ClassPathTests.java 2018-04-18 09:44:47.693488462 -0700 +++ new/test/hotspot/jtreg/runtime/appcds/jigsaw/classpathtests/ClassPathTests.java 2018-04-18 09:44:46.965419832 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,8 +31,8 @@ * @modules jdk.jartool/sun.tools.jar * @compile src/jdk/test/Main.java * @compile src/com/sun/tools/javac/Main.jasm - * @compile src/com/sun/tools/javac/Main2.jasm - * @compile src/javax/activation/UnsupportedDataTypeException2.jasm + * @compile src/com/sun/tools/javac/MyMain.jasm + * @compile ../../../SharedArchiveFile/javax/annotation/processing/FilerException.jasm * @run main ClassPathTests * @summary AppCDS tests for testing classpath/package conflicts */ @@ -73,8 +73,8 @@ // test classes to archive. These are both in UPGRADED_MODULES private static final String JIMAGE_CLASS = "com/sun/tools/javac/Main"; - private static final String APP_ARCHIVE_CLASS = "com/sun/tools/javac/Main2"; - private static final String PLATFORM_ARCHIVE_CLASS = "javax/activation/UnsupportedDataTypeException2"; + private static final String APP_ARCHIVE_CLASS = "com/sun/tools/javac/MyMain"; + private static final String PLATFORM_ARCHIVE_CLASS = "javax/annotation/processing/FilerException"; private static final String[] ARCHIVE_CLASSES = {APP_ARCHIVE_CLASS, PLATFORM_ARCHIVE_CLASS, JIMAGE_CLASS}; private static final int NUMBER_OF_TEST_CASES = 10; @@ -111,15 +111,17 @@ // dump the archive with altnernate jdk.comiler and jdk.activation classes in the class list OutputAnalyzer output1 = TestCommon.dump(appJar, TestCommon.list(ARCHIVE_CLASSES)); TestCommon.checkDump(output1); - // Only a class that belongs to a module which is not defined by default - // can be found. In this case the PLATFORM_ARCHIVE_CLASS belongs - // to the java.activation which is not defined by default; it is the only - // class can be found during dumping. + // The PLATFORM_ARCHIVE_CLASS belongs to the java.compiler + // module will be found from the module during dumping. + // The JIMAGE_CLASS will be found from the jdk.compiler module during + // dumping. + // The APP_ARCHIVE_CLASS, which belongs to a package within the + // jdk.compiler module, will not be found during dump time. for (String archiveClass : ARCHIVE_CLASSES) { - if (archiveClass.equals(PLATFORM_ARCHIVE_CLASS)) { - output1.shouldNotContain("Preload Warning: Cannot find " + archiveClass); - } else { + if (archiveClass.equals(APP_ARCHIVE_CLASS)) { output1.shouldContain("Preload Warning: Cannot find " + archiveClass); + } else { + output1.shouldNotContain("Preload Warning: Cannot find " + archiveClass); } } @@ -146,82 +148,86 @@ CDSTestUtils.runWithArchiveAndCheck(opts); } - // For tests #3 and #4, we need to "--add-modules java.activation" since the - // java.activation module won't be defined by default. - // #3: Archived classpath class in same package as jimage ext class. With AppCDS. - // Should fail to load. + // The class should be loaded from the module. public void testExtClassWithAppCDS() throws Exception { OutputAnalyzer output = TestCommon.exec( - appJar, "--add-modules", "java.activation", MAIN_CLASS, - "Test #3", PLATFORM_ARCHIVE_CLASS, "false"); // last 3 args passed to test + appJar, MAIN_CLASS, + "Test #3", PLATFORM_ARCHIVE_CLASS, "true", "EXT"); // last 4 args passed to test TestCommon.checkExec(output); } // #4: Archived classpath class in same package as jimage ext class. Without AppCDS. - // Should fail to load. + // The class should be loaded from the module. public void testExtClassWithoutAppCDS() throws Exception { CDSOptions opts = (new CDSOptions()) - .addPrefix("-cp", appJar, "--add-modules", "java.activation") + .addPrefix("-cp", appJar) .setArchiveName(testArchiveName) - .addSuffix(MAIN_CLASS, "Test #4", PLATFORM_ARCHIVE_CLASS, "false"); + .addSuffix(MAIN_CLASS, "Test #4", PLATFORM_ARCHIVE_CLASS, "true", "EXT"); CDSTestUtils.runWithArchiveAndCheck(opts); } // #5: Archived classpath class in same package as jimage app class. With AppCDS. - // Should load because --limit-modules is used. + // Should load with CDS disabled because --limit-modules is used. public void testAppClassWithLimitModsWithAppCDS() throws Exception { - OutputAnalyzer output = TestCommon.exec( - appJar, - "--limit-modules", "java.base", - MAIN_CLASS, - "Test #5", APP_ARCHIVE_CLASS, "true"); // last 3 args passed to test - TestCommon.checkExec(output); + TestCommon.run("-cp", appJar, + "--limit-modules", "java.base", + MAIN_CLASS, + "Test #5", APP_ARCHIVE_CLASS, "true") // last 3 args passed to test + .assertSilentlyDisabledCDS(out -> { + out.shouldHaveExitValue(0); + }); } // #6: Archived classpath class in same package as jimage app class. Without AppCDS. - // Should load because --limit-modules is used. + // Should load with CDS disabled because --limit-modules is used. public void testAppClassWithLimitModsWithoutAppCDS() throws Exception { CDSOptions opts = (new CDSOptions()) .addPrefix("-cp", appJar, "--limit-modules", "java.base") .setArchiveName(testArchiveName) .addSuffix(MAIN_CLASS, "Test #6", APP_ARCHIVE_CLASS, "true"); - - CDSTestUtils.runWithArchiveAndCheck(opts); + CDSTestUtils.run(opts) + .assertSilentlyDisabledCDS(out -> { + out.shouldHaveExitValue(0); + }); } // #7: Archived classpath class in same package as jimage ext class. With AppCDS. - // Should load because --limit-modules is used. + // Should load with CDS disabled because --limit-modules is used. public void testExtClassWithLimitModsWithAppCDS() throws Exception { - OutputAnalyzer output = TestCommon.exec( - appJar, - "--limit-modules", "java.base", - MAIN_CLASS, - "Test #7", PLATFORM_ARCHIVE_CLASS, "true"); // last 3 args passed to test - TestCommon.checkExec(output); + TestCommon.run("-cp", appJar, + "--limit-modules", "java.base", + MAIN_CLASS, + "Test #7", PLATFORM_ARCHIVE_CLASS, "true") // last 3 args passed to test + .assertSilentlyDisabledCDS(out -> { + out.shouldHaveExitValue(0); + }); } // #8: Archived classpath class in same package as jimage ext class. Without AppCDS. - // Should load because --limit-modules is used. + // Should load with CDS disabled because --limit-modules is used. public void testExtClassWithLimitModsWithoutAppCDS() throws Exception { CDSOptions opts = (new CDSOptions()) .addPrefix("-cp", appJar, "--limit-modules", "java.base") .setArchiveName(testArchiveName) .addSuffix(MAIN_CLASS, "Test #8", PLATFORM_ARCHIVE_CLASS, "true"); - - CDSTestUtils.runWithArchiveAndCheck(opts); + CDSTestUtils.run(opts) + .assertSilentlyDisabledCDS(out -> { + out.shouldHaveExitValue(0); + }); } // #9: Archived classpath class with same name as jimage app class. With AppCDS. - // Should load because --limit-modules is used. + // Should load with CDS disabled because --limit-modules is used. public void testReplacingJImageClassWithAppCDS() throws Exception { - OutputAnalyzer output = TestCommon.exec( - appJar, - "--limit-modules", "java.base", "-XX:+TraceClassLoading", - MAIN_CLASS, - "Test #9", JIMAGE_CLASS, "true"); // last 3 args passed to test - TestCommon.checkExec(output); + TestCommon.run("-cp", appJar, + "--limit-modules", "java.base", + MAIN_CLASS, + "Test #9", JIMAGE_CLASS, "true") // last 3 args passed to test + .assertSilentlyDisabledCDS(out -> { + out.shouldHaveExitValue(0); + }); } // #10: Archived classpath class with same name as jimage app class. Without AppCDS. @@ -233,8 +239,9 @@ .addPrefix("-cp", appJar, "--limit-modules", "java.base") .setArchiveName(testArchiveName) .addSuffix(MAIN_CLASS, "Test #10", JIMAGE_CLASS, "true"); - - CDSTestUtils.runWithArchiveAndCheck(opts); + CDSTestUtils.run(opts) + .assertSilentlyDisabledCDS(out -> { + out.shouldHaveExitValue(0); + }); } - } --- old/test/hotspot/jtreg/runtime/appcds/jigsaw/classpathtests/DummyClassesInBootClassPath.java 2018-04-18 09:44:51.727868760 -0700 +++ new/test/hotspot/jtreg/runtime/appcds/jigsaw/classpathtests/DummyClassesInBootClassPath.java 2018-04-18 09:44:50.928793436 -0700 @@ -27,11 +27,10 @@ * @summary Ensure that classes found in jimage takes precedence over classes found in -Xbootclasspath/a. * @requires vm.cds * @library /test/lib /test/hotspot/jtreg/runtime/appcds - * @modules java.activation - * jdk.jartool/sun.tools.jar + * @modules jdk.jartool/sun.tools.jar * @compile ../../test-classes/DummyClassHelper.java * @compile ../../test-classes/java/net/HttpCookie.jasm - * @compile ../../test-classes/javax/activation/MimeType.jasm + * @compile ../../../SharedArchiveFile/javax/annotation/processing/FilerException.jasm * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * @run main DummyClassesInBootClassPath @@ -57,21 +56,20 @@ public static void main(String[] args) throws Exception { String classNames[] = { "java/net/HttpCookie", - "javax/activation/MimeType"}; + "javax/annotation/processing/FilerException"}; JarBuilder.build("dummyClasses", classNames[0], classNames[1]); String appJar = TestCommon.getTestJar("dummyClasses.jar"); OutputAnalyzer dumpOutput = TestCommon.dump( - appJar, classNames, "-Xbootclasspath/a:" + appJar, - "--add-modules", "java.activation"); + appJar, classNames, "-Xbootclasspath/a:" + appJar); List argsList = new ArrayList(); for (int i = 0; i < classNames.length; i++) { argsList.add(classNames[i].replace('/', '.')); } String[] arguments = new String[argsList.size()]; arguments = argsList.toArray(arguments); - Testcommon.run( - "--add-modules", "java.activation", "-Xbootclasspath/a:" + appJar, + TestCommon.run( + "-Xbootclasspath/a:" + appJar, "DummyClassHelper", arguments[0], arguments[1]) .assertNormalExit(output -> checkOutput(output, classNames)); @@ -80,14 +78,14 @@ String bootClassPath = "-Xbootclasspath/a:" + appJar + File.pathSeparator + whiteBoxJar; dumpOutput = TestCommon.dump( - appJar, classNames, bootClassPath, "--add-modules", "java.activation"); + appJar, classNames, bootClassPath); argsList.add("testWithWhiteBox"); arguments = new String[argsList.size()]; arguments = argsList.toArray(arguments); String[] opts = {"-XX:+UnlockDiagnosticVMOptions", "-XX:+WhiteBoxAPI", - "--add-modules", "java.activation", bootClassPath, "-Xlog:class+path=trace", + bootClassPath, "-Xlog:class+path=trace", "DummyClassHelper", arguments[0], arguments[1], arguments[2]}; - Testcommon.run(opts) + TestCommon.run(opts) .assertNormalExit(output -> checkOutput(output, classNames)); } } --- old/test/hotspot/jtreg/runtime/appcds/jigsaw/classpathtests/src/jdk/test/Main.java 2018-04-18 09:44:53.774061642 -0700 +++ new/test/hotspot/jtreg/runtime/appcds/jigsaw/classpathtests/src/jdk/test/Main.java 2018-04-18 09:44:53.298016768 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -96,10 +96,12 @@ } // Make sure we got the right version of the class. toString() of an instance // of the overridden version of the class should return "hi". - String s = clazz.newInstance().toString(); - if (!s.equals("hi")) { - throw new RuntimeException(testName + " FAILED: toString() returned \"" + s - + "\" instead of \"hi\"" ); + if (actualLoader == SYS_LOADER) { + String s = clazz.newInstance().toString(); + if (!s.equals("hi")) { + throw new RuntimeException(testName + " FAILED: toString() returned \"" + s + + "\" instead of \"hi\"" ); + } } System.out.println(testName + " PASSED: class loaded as expected."); } else { --- old/test/hotspot/jtreg/runtime/appcds/jigsaw/overridetests/OverrideTests.java 2018-04-18 09:44:56.188289217 -0700 +++ new/test/hotspot/jtreg/runtime/appcds/jigsaw/overridetests/OverrideTests.java 2018-04-18 09:44:55.466221152 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -67,7 +67,7 @@ private static final Path MODS_DIR = Paths.get("mods"); // the module that is upgraded - private static final String[] UPGRADED_MODULES = {"jdk.compiler", "java.activation"}; + private static final String[] UPGRADED_MODULES = {"jdk.compiler", "java.net.http"}; private static final Path[] UPGRADEDMODS_DIR = {Paths.get("upgradedmod1"), Paths.get("upgradedmod2")}; // the test module @@ -76,7 +76,7 @@ // test classes to archive. These are both in UPGRADED_MODULES private static final String APP_ARCHIVE_CLASS = "com/sun/tools/javac/Main"; - private static final String PLATFORM_ARCHIVE_CLASS = "javax/activation/UnsupportedDataTypeException"; + private static final String PLATFORM_ARCHIVE_CLASS = "java/net/http/HttpTimeoutException"; private static final String[] ARCHIVE_CLASSES = {APP_ARCHIVE_CLASS, PLATFORM_ARCHIVE_CLASS}; private static String testArchiveName; @@ -94,10 +94,10 @@ int i = 0; for (String upgradedMod : UPGRADED_MODULES) { compiled = CompilerUtils.compile( - SRC_DIR.resolve(upgradedMod), - UPGRADEDMODS_DIR[i].resolve(upgradedMod) + SRC_DIR.resolve(UPGRADED_MODULES[i]), + UPGRADEDMODS_DIR[i].resolve(UPGRADED_MODULES[i]) ); - Asserts.assertTrue(compiled, upgradedMod + " did not compile"); + Asserts.assertTrue(compiled, UPGRADED_MODULES[i] + " did not compile"); i++; } @@ -110,22 +110,13 @@ ); Asserts.assertTrue(compiled, TEST_MODULE + " did not compile"); - // the java.activation module is not defined by default; --add-modules is required. - // dumping without "--add-modules java.activation" - // the class in the javax.activation package cannot be found - OutputAnalyzer output1 = TestCommon.dump(null /* appJar*/, TestCommon.list(ARCHIVE_CLASSES)); - TestCommon.checkDump(output1); - output1.shouldContain( - "Preload Warning: Cannot find javax/activation/UnsupportedDataTypeException"); - - // dump the archive with jdk.comiler and java.activation classes in the class list - // with "--add-modules java.activation" - output1 = TestCommon.dump(null /* appJar*/, TestCommon.list(ARCHIVE_CLASSES), - "--add-modules", "java.activation"); - TestCommon.checkDump(output1); + // dump the archive with jdk.comiler and jdk.incubator.httpclient classes in the class list + // with "--add-modules jdk.incubator.httpclient" + OutputAnalyzer output = TestCommon.dump(null /* appJar*/, TestCommon.list(ARCHIVE_CLASSES)); + TestCommon.checkDump(output); // Make sure all the classes where successfully archived. for (String archiveClass : ARCHIVE_CLASSES) { - output1.shouldNotContain("Preload Warning: Cannot find " + archiveClass); + output.shouldNotContain("Preload Warning: Cannot find " + archiveClass); } testArchiveName = TestCommon.getCurrentArchiveName(); @@ -147,11 +138,11 @@ /** * PLATFORM Class Overriding Tests * - * Archive PLATFORM class javax.activation.UnsupportedDataTypeException from module jdk.activation. - * -At run time, upgrade module jdk.activation using --upgrade-module-path. - * Class.forname(UnsupportedDataTypeException) MUST NOT load the archived UnsupportedDataTypeException. - * -At run time, module jdk.activation also exists in --module-path. - * Class.forname(UnsupportedDataTypeException) MUST load the archived UnsupportedDataTypeException. + * Archive PLATFORM class java.net.http.HttpTimeoutException from module java.net.http. + * -At run time, upgrade module java.net.http using --upgrade-module-path. + * Class.forname(HttpTimeoutException) MUST NOT load the archived HttpTimeoutException. + * -At run time, module java.net.http also exists in --module-path. + * Class.forname(HttpTimeoutException) MUST load the archived HttpTimeoutException. */ public void testPlatformClassOverriding() throws Exception { testClassOverriding(PLATFORM_ARCHIVE_CLASS, "platform"); @@ -173,24 +164,22 @@ prefix[0] = "-cp"; prefix[1] = "\"\""; prefix[2] = "--add-modules"; - prefix[3] = "java.activation"; + prefix[3] = "java.net.http"; // Run the test with --upgrade-module-path set to alternate location of archiveClass // The alternate version of archiveClass SHOULD be found. - output = TestCommon.execModule( - prefix, - UPGRADEDMODS_DIR[upgradeModIdx].toString(), - MODS_DIR.toString(), - mid, - archiveClass, loaderName, "true"); // last 3 args passed to test - if (isAppLoader) { - try { - output.shouldContain(expectedException); - } catch (Exception e) { - TestCommon.checkCommonExecExceptions(output, e); - } - } else { - TestCommon.checkExec(output); + CDSTestUtils.Result res = TestCommon.runWithModules( + prefix, + UPGRADEDMODS_DIR[upgradeModIdx].toString(), + MODS_DIR.toString(), + mid, + archiveClass, loaderName, "true"); // last 3 args passed to test + + output = res.getOutput(); + try { + output.shouldContain(expectedException); + } catch (Exception e) { + TestCommon.checkCommonExecExceptions(output, e); } // Now run this same test again, but this time without AppCDS. Behavior should be the same. @@ -203,26 +192,21 @@ output = CDSTestUtils.runWithArchive(opts); - if (isAppLoader) { - try { - output.shouldContain(expectedException); - } catch (Exception e) { - TestCommon.checkCommonExecExceptions(output, e); - } - } else { - if (!CDSTestUtils.isUnableToMap(output)) - output.shouldHaveExitValue(0); + try { + output.shouldContain(expectedException); + } catch (Exception e) { + TestCommon.checkCommonExecExceptions(output, e); } // Run the test with -p set to alternate location of archiveClass. // The alternate version of archiveClass SHOULD NOT be found. - output = TestCommon.execModule( + res = TestCommon.runWithModules( prefix, null, UPGRADEDMODS_DIR[upgradeModIdx].toString() + java.io.File.pathSeparator + MODS_DIR.toString(), mid, archiveClass, loaderName, "false"); // last 3 args passed to test - TestCommon.checkExec(output); + TestCommon.checkExec(res.getOutput()); // Now run this same test again, but this time without AppCDS. Behavior should be the same. opts = (new CDSOptions()) --- old/test/hotspot/jtreg/runtime/appcds/jigsaw/overridetests/src/test/jdk/test/Main.java 2018-04-18 09:44:57.856446465 -0700 +++ new/test/hotspot/jtreg/runtime/appcds/jigsaw/overridetests/src/test/jdk/test/Main.java 2018-04-18 09:44:57.442407436 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -73,11 +73,15 @@ Class clazz = Class.forName(className, true, loader); // Make sure we got the expected defining ClassLoader testLoader(clazz, loader); - // Create an instance and see what toString() returns - String s = clazz.newInstance().toString(); + + String s = null; + if (shouldOverride) { + // Create an instance and see what toString() returns + clazz.newInstance().toString(); + } // The overridden version of the class should return "hi". Make sure // it does only if we are expecting to have loaded the overridden version. - assertTrue(s.equals("hi") == shouldOverride); + assertTrue("hi".equals(s) == shouldOverride); } /** --- old/test/hotspot/jtreg/runtime/appcds/jigsaw/overridetests/src/test/module-info.java 2018-04-18 09:44:59.956644438 -0700 +++ new/test/hotspot/jtreg/runtime/appcds/jigsaw/overridetests/src/test/module-info.java 2018-04-18 09:44:59.319584386 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,5 +24,5 @@ module test { requires jdk.compiler; - requires java.activation; + requires java.compiler; } --- old/test/hotspot/jtreg/runtime/appcds/test-classes/HelloExt.java 2018-04-18 09:45:03.160946489 -0700 +++ new/test/hotspot/jtreg/runtime/appcds/test-classes/HelloExt.java 2018-04-18 09:45:02.356870693 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,7 +27,7 @@ public class HelloExt { public static void main(String[] args) throws Throwable { - String className = "org.omg.CORBA.ORB"; + String className = "javax.annotation.processing.FilerException"; Class cls = Class.forName(className); ClassLoader loader = cls.getClassLoader(); --- old/test/lib/jdk/test/lib/cds/CDSTestUtils.java 2018-04-18 09:45:05.903204985 -0700 +++ new/test/lib/jdk/test/lib/cds/CDSTestUtils.java 2018-04-18 09:45:05.140133055 -0700 @@ -211,6 +211,10 @@ return this; } + + public OutputAnalyzer getOutput() { + return output; + } } // Specify this property to copy sdandard output of the child test process to @@ -366,6 +370,10 @@ return new Result(opts, runWithArchive(opts)); } + public static Result run(CDSOptions opts) throws Exception { + return new Result(opts, runWithArchive(opts)); + } + // Execute JVM with CDS archive, specify command line args suffix public static OutputAnalyzer runWithArchive(String... cliPrefix) throws Exception { --- /dev/null 2018-02-08 21:21:41.723217456 -0800 +++ new/test/hotspot/jtreg/runtime/SharedArchiveFile/javax/annotation/processing/FilerException.jasm 2018-04-18 09:45:07.787382596 -0700 @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package javax/annotation/processing; + +public class FilerException + version 51:0 +{ + +public Method "":"()V" + stack 1 locals 1 +{ + aload_0; + invokespecial Method java/lang/Object."":"()V"; + return; +} + + +public Method toString:"()Ljava/lang/String;" + stack 1 locals 1 +{ + ldc String "hi"; + areturn; +} + +} --- old/test/hotspot/jtreg/runtime/appcds/jigsaw/classpathtests/src/com/sun/tools/javac/Main2.jasm 2018-04-18 09:45:10.140604420 -0700 +++ /dev/null 2018-02-08 21:21:41.723217456 -0800 @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -package com/sun/tools/javac; - -public class Main2 - version 51:0 -{ - -public Method "":"()V" - stack 1 locals 1 -{ - aload_0; - invokespecial Method java/lang/Object."":"()V"; - return; -} - -public Method toString:"()Ljava/lang/String;" - stack 1 locals 1 -{ - ldc String "hi"; - areturn; -} - -} // end class Main2 --- /dev/null 2018-02-08 21:21:41.723217456 -0800 +++ new/test/hotspot/jtreg/runtime/appcds/jigsaw/classpathtests/src/com/sun/tools/javac/MyMain.jasm 2018-04-18 09:45:09.526546537 -0700 @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +package com/sun/tools/javac; + +public class MyMain + version 51:0 +{ + +public Method "":"()V" + stack 1 locals 1 +{ + aload_0; + invokespecial Method java/lang/Object."":"()V"; + return; +} + +public Method toString:"()Ljava/lang/String;" + stack 1 locals 1 +{ + ldc String "hi"; + areturn; +} + +} // end class Main2 --- /dev/null 2018-02-08 21:21:41.723217456 -0800 +++ new/test/hotspot/jtreg/runtime/appcds/jigsaw/overridetests/src/java.net.http/java/net/http/HttpTimeoutException.java 2018-04-18 09:45:13.083881866 -0700 @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +package java.net.http; + +public class HttpTimeoutException { + public String toString() { + return "hi"; + } +} --- /dev/null 2018-02-08 21:21:41.723217456 -0800 +++ new/test/hotspot/jtreg/runtime/appcds/jigsaw/overridetests/src/java.net.http/module-info.java 2018-04-18 09:45:15.924149601 -0700 @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +module java.net.http { + exports java.net.http; +} + --- old/test/hotspot/jtreg/runtime/SharedArchiveFile/org/omg/CORBA/Context.jasm 2018-04-18 09:45:18.806421297 -0700 +++ /dev/null 2018-02-08 21:21:41.723217456 -0800 @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package org/omg/CORBA; - -public class Context - version 51:0 -{ - -public Method "":"()V" - stack 1 locals 1 -{ - aload_0; - invokespecial Method java/lang/Object."":"()V"; - return; -} - - -public Method toString:"()Ljava/lang/String;" - stack 1 locals 1 -{ - ldc String "hi"; - areturn; -} - -} --- old/test/hotspot/jtreg/runtime/appcds/jigsaw/classpathtests/src/javax/activation/UnsupportedDataTypeException2.jasm 2018-04-18 09:45:19.913525657 -0700 +++ /dev/null 2018-02-08 21:21:41.723217456 -0800 @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -package javax/activation; - -public class UnsupportedDataTypeException2 - version 51:0 -{ - -public Method "":"()V" - stack 1 locals 1 -{ - aload_0; - invokespecial Method java/lang/Object."":"()V"; - return; -} - -public Method toString:"()Ljava/lang/String;" - stack 1 locals 1 -{ - ldc String "hi"; - areturn; -} - -} // end class UnsupportedDataTypeException2 --- old/test/hotspot/jtreg/runtime/appcds/jigsaw/overridetests/src/java.activation/javax/activation/UnsupportedDataTypeException.java 2018-04-18 09:45:21.249651605 -0700 +++ /dev/null 2018-02-08 21:21:41.723217456 -0800 @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -package javax.activation; - -import java.io.IOException; - -public class UnsupportedDataTypeException extends IOException { - public UnsupportedDataTypeException() { - } - - public String toString() { - return "hi"; - } -} --- old/test/hotspot/jtreg/runtime/appcds/jigsaw/overridetests/src/java.activation/module-info.java 2018-04-18 09:45:22.598778780 -0700 +++ /dev/null 2018-02-08 21:21:41.723217456 -0800 @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -module java.activation { - exports javax.activation; -} - --- old/test/hotspot/jtreg/runtime/appcds/test-classes/javax/activation/MimeType.jasm 2018-04-18 09:45:23.573870696 -0700 +++ /dev/null 2018-02-08 21:21:41.723217456 -0800 @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -package javax/activation; - -public class MimeType - version 51:0 -{ - -public Method thisClassIsDummy:"()V" - stack 0 locals 0 -{ - return; -} - -} // end class MimeType