8230649 : Make jpackage tool an experimental feature JDK-8200758-branch
authorherrick
Thu, 26 Sep 2019 09:19:46 -0400
branchJDK-8200758-branch
changeset 58359 e065fd274bc1
parent 58346 d5a3cd78e560
child 58360 fd45b7e2c027
8230649 : Make jpackage tool an experimental feature Reviewed-by: asemenyuk, kcr
src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/MainResources.properties
src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/MainResources_ja.properties
src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/MainResources_zh_CN.properties
src/jdk.jpackage/share/classes/jdk/jpackage/main/Main.java
test/jdk/tools/jpackage/helpers/JPackageHelper.java
test/jdk/tools/jpackage/share/ErrorTest.java
--- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/MainResources.properties	Wed Sep 25 17:36:28 2019 -0400
+++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/MainResources.properties	Thu Sep 26 09:19:46 2019 -0400
@@ -28,6 +28,7 @@
 param.description.default=None
 param.vendor.default=Unknown
 
+warning.experimental=WARNING: Using experimental tool jpackage
 message.using-default-resource=Using default package resource {0} {1} (add {2} to the resource-dir to customize).
 message.no-default-resource=no default package resource {0} {1} (add {2} to the resource-dir to customize).
 message.using-custom-resource-from-file=Using custom package resource {0} (loaded from file {1}).
--- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/MainResources_ja.properties	Wed Sep 25 17:36:28 2019 -0400
+++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/MainResources_ja.properties	Thu Sep 26 09:19:46 2019 -0400
@@ -28,6 +28,7 @@
 param.description.default=None
 param.vendor.default=Unknown
 
+warning.experimental=WARNING: Using experimental tool jpackage
 message.using-default-resource=Using default package resource {0} {1} (add {2} to the resource-dir to customize).
 message.no-default-resource=no default package resource {0} {1} (add {2} to the resource-dir to customize).
 message.using-custom-resource-from-file=Using custom package resource {0} (loaded from file {1}).
--- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/MainResources_zh_CN.properties	Wed Sep 25 17:36:28 2019 -0400
+++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/MainResources_zh_CN.properties	Thu Sep 26 09:19:46 2019 -0400
@@ -28,6 +28,7 @@
 param.description.default=None
 param.vendor.default=Unknown
 
+warning.experimental=WARNING: Using experimental tool jpackage
 message.using-default-resource=Using default package resource {0} {1} (add {2} to the resource-dir to customize).
 message.no-default-resource=no default package resource {0} {1} (add {2} to the resource-dir to customize).
 message.using-custom-resource-from-file=Using custom package resource {0} (loaded from file {1}).
--- a/src/jdk.jpackage/share/classes/jdk/jpackage/main/Main.java	Wed Sep 25 17:36:28 2019 -0400
+++ b/src/jdk.jpackage/share/classes/jdk/jpackage/main/Main.java	Thu Sep 26 09:19:46 2019 -0400
@@ -70,6 +70,7 @@
     }
 
     private int execute(String... args) {
+        Log.info(I18N.getString("warning.experimental"));
         try {
             String[] newArgs;
             try {
--- a/test/jdk/tools/jpackage/helpers/JPackageHelper.java	Wed Sep 25 17:36:28 2019 -0400
+++ b/test/jdk/tools/jpackage/helpers/JPackageHelper.java	Thu Sep 26 09:19:46 2019 -0400
@@ -552,7 +552,9 @@
         List<String> origList = new ArrayList(Arrays.asList(result));
         List<String> newlist = new ArrayList();
         origList.stream().filter((str) ->
-                (!str.startsWith("Picked up"))).forEachOrdered((str) -> {
+                (!str.startsWith("Picked up") &&
+                 !str.startsWith("WARNING: Using experimental")))
+                .forEachOrdered((str) -> {
             newlist.add(str);
         });
 
--- a/test/jdk/tools/jpackage/share/ErrorTest.java	Wed Sep 25 17:36:28 2019 -0400
+++ b/test/jdk/tools/jpackage/share/ErrorTest.java	Thu Sep 26 09:19:46 2019 -0400
@@ -67,7 +67,7 @@
 
     private static void validate(String output, String expected, boolean single)
             throws Exception {
-        String[] result = output.split("\n");
+        String[] result = JPackageHelper.splitAndFilter(output);
         if (single && result.length != 1) {
             System.err.println(output);
             throw new AssertionError("Unexpected multiple lines of output: "