RFR JDK-8170114 jimage extract to not an empty directory overwrites content of the directory

Michal Vala mvala at redhat.com
Fri Feb 9 15:23:29 UTC 2018


Hi,

sending fix for jimage bug JDK-8170114[1]. I'm not sure whether this is correct 
list. If it is not, please direct me somewhere else.

I don't have an openjdk account, so webrev is on my fedora public space. I will 
need a sponsor for this.

webrev: https://michalvala.fedorapeople.org/webrevs/JDK-8170114/webrev.00/webrev/

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).

I've implemented beforeTest method, that cleans cwd. This must be done because 
files were extracted to cwd and constantly overwriting and tests were 
non-deterministic (order did matter). Plus some tests added.




I want to fix JDK-8170120 with IOException when file is not an jimage. It is 
blocked by this. This will fix 3 now problematic and excluded tests.

[1] - https://bugs.openjdk.java.net/browse/JDK-8170114

-- 
Michal Vala
OpenJDK QE
Red Hat Czech


More information about the jigsaw-dev mailing list