RFR: 8059269 - FileHandler may throw NPE if pattern is a simple name and the lock file already exists
Daniel Fuchs
daniel.fuchs at oracle.com
Mon Sep 29 13:47:11 UTC 2014
On 29/09/14 15:12, Alan Bateman wrote:
> On 29/09/2014 13:53, Daniel Fuchs wrote:
>> - 233 FileChannel.open(Paths.get(file + ".lck"), CREATE_NEW, WRITE);
>> - 234 FileChannel.open(Paths.get(file + ".1.lck"), CREATE_NEW, WRITE);
>> + 233 FileChannel.open(Paths.get(file + ".lck"), CREATE_NEW, WRITE)
>> .close();
>> + 234 FileChannel.open(Paths.get(file + ".1.lck"), CREATE_NEW, WRITE)
>> .close();
>>
>> http://cr.openjdk.java.net/~dfuchs/webrev_8059269/webrev.01
> That is okay, alternatively just use Files.createFile.
Oh, much simpler indeed. What was I thinking?
Done.
http://cr.openjdk.java.net/~dfuchs/webrev_8059269/webrev.02
-- daniel
More information about the core-libs-dev
mailing list