RFR JDK-8170114 jimage extract to not an empty directory overwrites content of the directory
mandy chung
mandy.chung at oracle.com
Sat Feb 10 00:04:13 UTC 2018
On 2/9/18 7:23 AM, Michal Vala wrote:
>
> Patch validates output directory before any jimage extracting happen.
> I've moved validation to extra private method as it is few lines of
> code. I've also added proper error message for case when output path
> is not a directory (JImageTask.java#449).
>
Thanks for looking at JDK-8170114 and JDK-8170120. I took a look at
http://cr.openjdk.java.net/~shade/8170114/webrev.01/
Alternatively, jimage extract can behave as jlink and it fails if the
specified output directory exists including empty directory. It'd be
easy to delete the directory in the command-line before running jimage.
You extend JImageCliTest to handle the beforeTest method to be invoked
before running each test case. Is that necessary? The test itself is
creating temp file/directory for each test case. I think it'd be good
to update the test to create a named file/dir under the scratch area as
jtreg will take care of cleaning the scratch area.
Mandy
More information about the jigsaw-dev
mailing list