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 08:51:24 UTC 2014


On 29/09/14 05:01, Alan Bateman wrote:
> On 26/09/2014 19:33, Daniel Fuchs wrote:
>> Hi,
>>
>> Please find below a patch for [1]
>>
>> 8059269: FileHandler may throw NPE if pattern is a simple name and
>>          the lock file already exists
>>
>> [1] https://bugs.openjdk.java.net/browse/JDK-8059269
>>
>> The webrev is here:
>> http://cr.openjdk.java.net/~dfuchs/webrev_8059269/webrev.00
>>
> This looks okay to me, maybe an alternative is to just remove the check
> completely.

Thanks Alan.

> In the test then the test method could use try-with-resources so that if
> this test does fail then it would be best not to leave a file open.

The files created by the test (both log files and lock files) will be
removed by the finally block at lines 150 - 174 - so the test shouldn't
leave any files open (which I verified by running the test on a JDK that
does not have the fix).

-- daniel
>
> -Alan
>
>




More information about the core-libs-dev mailing list