8164866: tools/jlink/plugins/GenerateJLIClassesPluginTest.java can't compile after JDK-8163371
authorredestad
Fri, 26 Aug 2016 18:10:12 +0200
changeset 40562 c44c16dcaaef
parent 40561 4b8e4009f913
child 40563 4bff68330f39
8164866: tools/jlink/plugins/GenerateJLIClassesPluginTest.java can't compile after JDK-8163371 Reviewed-by: sundar, vlivanov
jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/GenerateJLIClassesPlugin.java
jdk/test/tools/jlink/plugins/GenerateJLIClassesPluginTest.java
--- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/GenerateJLIClassesPlugin.java	Fri Aug 26 21:31:47 2016 +0530
+++ b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/GenerateJLIClassesPlugin.java	Fri Aug 26 18:10:12 2016 +0200
@@ -110,7 +110,7 @@
      * A better long-term solution is to define and run a set of quick
      * generators and extracting this list as a step in the build process.
      */
-    private static List<String> defaultSpecies() {
+    public static List<String> defaultSpecies() {
         return List.of("LL", "L3", "L4", "L5", "L6", "L7", "L7I",
                 "L7II", "L7IIL", "L8", "L9", "L10", "L10I", "L10II", "L10IIL",
                 "L11", "L12", "L13", "LI", "D", "L3I", "LIL", "LLI", "LLIL",
--- a/jdk/test/tools/jlink/plugins/GenerateJLIClassesPluginTest.java	Fri Aug 26 21:31:47 2016 +0530
+++ b/jdk/test/tools/jlink/plugins/GenerateJLIClassesPluginTest.java	Fri Aug 26 18:10:12 2016 +0200
@@ -73,47 +73,6 @@
                     classFilesForSpecies(GenerateJLIClassesPlugin.defaultSpecies()),
                     List.of());
 
-
-        // Test a valid set of options
-        result = JImageGenerator.getJLinkTask()
-                .modulePath(helper.defaultModulePath())
-                .output(helper.createNewImageDir("generate-jli"))
-                .option("--generate-jli-classes=bmh:bmh-species=LL,L3")
-                .addMods("java.base")
-                .call();
-
-        image = result.assertSuccess();
-
-        JImageValidator.validate(
-                image.resolve("lib").resolve("modules"),
-                classFilesForSpecies(List.of("LL", "L3")),
-                classFilesForSpecies(List.of("L4")));
-
-
-        // Test disabling BMH species generation
-        result = JImageGenerator.getJLinkTask()
-                .modulePath(helper.defaultModulePath())
-                .output(helper.createNewImageDir("generate-jli"))
-                .option("--generate-jli-classes=not-bmh:bmh-species=LL,L3")
-                .addMods("java.base")
-                .call();
-
-        image = result.assertSuccess();
-        JImageValidator.validate(
-            image.resolve("lib").resolve("modules"),
-            List.of(),
-            classFilesForSpecies(List.of("LL", "L3", "L4")));
-
-
-        // Test an invalid set of options
-        result = JImageGenerator.getJLinkTask()
-                .modulePath(helper.defaultModulePath())
-                .output(helper.createNewImageDir("generate-jli"))
-                .option("--generate-jli-classes=bmh:bmh-species=LL,L7V")
-                .addMods("java.base")
-                .call();
-
-        result.assertFailure();
     }
 
     private static List<String> classFilesForSpecies(List<String> species) {