[PATCH] Review quest for bug 8023878 TEST_BUG java/nio/file/WatchService/SensitivityModifier.java fails intermittently

Alan Bateman Alan.Bateman at oracle.com
Thu Sep 5 12:44:22 PDT 2013


On 03/09/2013 13:15, Eric Wang wrote:
> Hi,
>
> Please help to review the fix 
> http://cr.openjdk.java.net/~ewang/8023878/webrev.00/ for bug 
> https://bugs.openjdk.java.net/browse/JDK-8023878.
>
> There's a defect in the loop of old test as below, if the eventRecived 
> is true, the while loop is broken which causes keys of watcher are not 
> reset, it causes the watcher.take() is hung in next execution in the 
> for loop.
Sorry the delay, I've been busy with other things.

I think your analysis is right, the while loop terminates when the event 
is detected but there may be more than one event queued. Your fixes 
looks okay, an alternative would be to just change L106 only.

-Alan


More information about the nio-dev mailing list