On 02/17/2018 08:17 AM, Alan Bateman wrote:
On 16/02/2018 14:39, Michal Vala wrote:
:

That sounds reasonable. Here's the webrev: http://cr.openjdk.java.net/~shade/8170120/webrev.01/

It fixes JImageVerifyTest so I've removed it from ProblemList.


note: JImageExtractTest still failing on not-empty-dir(JDK-8170114) and JImageListTest fails on simplest list test. I'll take a look at it later.

The changes look good, I just wonder if it would be better to specify {0} as file rather than file.getName(). Just thinking about a script running this tool failing because the file path is wrong, I think it could be useful to have it in error.

Yes, true. Attached.


-Alan


--
Michal Vala
OpenJDK QE
Red Hat Czech
--- old/src/jdk.jlink/share/classes/jdk/tools/jimage/JImageTask.java	2018-02-19 12:59:49.727985281 +0100
+++ new/src/jdk.jlink/share/classes/jdk/tools/jimage/JImageTask.java	2018-02-19 12:59:49.440984670 +0100
@@ -431,6 +431,8 @@
                         }
                     }
                 }
+            } catch (IOException ioe) {
+                throw TASK_HELPER.newBadArgs("err.invalid.jimage", file, ioe.getMessage());
             }
         }
     }
--- old/src/jdk.jlink/share/classes/jdk/tools/jimage/resources/jimage.properties	2018-02-19 12:59:50.279986455 +0100
+++ new/src/jdk.jlink/share/classes/jdk/tools/jimage/resources/jimage.properties	2018-02-19 12:59:50.018985900 +0100
@@ -95,6 +95,7 @@
 err.missing.arg=no value given for {0}
 err.not.a.dir=not a directory: {0}
 err.not.a.jimage=not a jimage file: {0}
+err.invalid.jimage=Unable to open {0}: {1}
 err.no.jimage=no jimage provided
 err.option.unsupported={0} not supported: {1}
 err.unknown.option=unknown option: {0}
--- old/test/jdk/ProblemList.txt	2018-02-19 12:59:50.813987591 +0100
+++ new/test/jdk/ProblemList.txt	2018-02-19 12:59:50.561987055 +0100
@@ -466,7 +466,6 @@
 
 tools/jimage/JImageExtractTest.java                             8170120 generic-all
 tools/jimage/JImageListTest.java                                8170120 generic-all
-tools/jimage/JImageVerifyTest.java                              8170120 generic-all
 
 ############################################################################
 

Reply via email to