RFR [8011537]: (fs) Path.register(..) clears interrupt status of thread with no InterruptedException
Alan Bateman
Alan.Bateman at oracle.com
Tue May 6 14:38:26 UTC 2014
On 06/05/2014 14:56, Ivan Gerasimov wrote:
> Hello!
>
> 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.
-Alan
More information about the nio-dev
mailing list