-
Type:
Bug
-
Status: Resolved
-
Resolution: Fixed
-
Affects Version/s: 2.5, 2.8
-
Fix Version/s: 2.10-rc-1
The JDK WatchService has problems on Windows related to file locks kept on watched directories.
https://bugs.openjdk.java.net/browse/JDK-7052697
https://bugs.openjdk.java.net/browse/JDK-6972833
The workaround is to use the FILE_TREE extension of WatchService which is only available on Windows. In this mode, the WatchService should only register the root directory of a file tree to the WatchService instead of registering each sub directory.
The assumption is also that using the FILE_TREE extension would make the JDK WatchService more reliable on Windows since some integration tests are occasionally failing in the CI environment because of lost file change events.