RFR [8011537]: (fs) Path.register(..) clears interrupt status of thread with no InterruptedException

Ivan Gerasimov ivan.gerasimov at oracle.com
Tue May 6 14:52:08 UTC 2014

Thank you Alan!

>> The interrupted status of a thread gets cleared with a call to 
>> Path.register().
>> This is due to call to Object.wait().
>> Below is the fix with an updated regtest.
>> Would you please help review it?
>> BUGURL: https://bugs.openjdk.java.net/browse/JDK-8011537
>> WEBREV: http://cr.openjdk.java.net/~igerasim/8011537/0/webrev/
> The change looks good, an oversight in the original implementation.
> A minor comment on the test is that we can using try-with-resources 
> (as WatchService is Closeable). The register could also use the 
> varargs variant to avoid creating the array explicitly but either way 
> is fine.
I tried to make the added test consistent with the rest of the code.
I can surely rewrite it, but should I refactor other code as well then?

Sincerely yours,

More information about the core-libs-dev mailing list