5 ms·
java.nio.file.WatchService is subtly broken on Linux
- gravypod 11y agoIs this the problem that is mentioned within the JavaDoc https://docs.oracle.com/javase/7/docs/api/java/nio/file/WatchService.html https://docs.oracle.com/javase/7/docs/api/java/nio/file/Watc... under "Platform dependencies"
- jdmichal 11y agoIt's not the same issue. In this case, it's a logic error: 1. Event A is read into a buffer. 2. Event B is read into the same buffer. 3. Event B is processed. 4. Event A is processed. So, when (4) happens, its buffer from (1) has been clobbered.
- gravypod 11y agoWell that is definitely odd. I hope this does eventually get fixed.
- batterseapower 11y agoOh hey, it's my blog post. I reported this to Oracle about 3 months ago (ref JI-9024492) but haven't heard anything since 2015-09-29, when they contacted me asking for some code to reproduce the issue (which I gave to them on the same day). :-/
- jdmichal 11y agoThanks for this. I have a project using WatchService right now, and this is extremely helpful to have in mind.
- flarecoder 11y agoDiscussion on nio-dev mailing list: http://mail.openjdk.java.net/pipermail/nio-dev/2015-December/003415.html http://mail.openjdk.java.net/pipermail/nio-dev/2015-December...