Review Request: JDK-8173096 jmod files are not world-readable

Mandy Chung mandy.chung at oracle.com
Tue Jan 24 16:28:55 UTC 2017


> On Jan 22, 2017, at 3:17 AM, Peter Levart <peter.levart at gmail.com> wrote:
> 
> Hi Mandy,
> 
> On 01/21/2017 03:32 AM, Mandy Chung wrote:
>> Updated webrev to put the temporary file in the same containing directory of the target file:
>>   http://cr.openjdk.java.net/~mchung/jdk9/webrevs/8173096/webrev.01 <http://cr.openjdk.java.net/~mchung/jdk9/webrevs/8173096/webrev.01>
> That's ok. Maybe also specify ATOMIC_MOVE to CopyOption ... options in Files.move() ? Currently the move will be atomic (rename in UNIX terminology) because the source and target are in the same directory, but if renaming fails for some reason, it will try the fallback to copy(src, dst) + remove(src). If you add ATOMIC_MOVE to options, failure to rename will result in exception. I don't know which one do you prefer?

I file https://bugs.openjdk.java.net/browse/JDK-8173280 <https://bugs.openjdk.java.net/browse/JDK-8173280>

I prefer to see how jmod is used and any one runs into this issue that the atomic move and fallback to copy/remove may be needed.  The build could avoid the interference by creating a JMOD of the same name in a different directory.

Mandy



More information about the jigsaw-dev mailing list