RFR: 8293067: (fs) Implement WatchService using system library (macOS) [v8]
Maxim Kartashev
mkartashev at openjdk.org
Wed Oct 19 06:18:42 UTC 2022
On Tue, 18 Oct 2022 18:30:46 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
>> Maxim Kartashev has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Don't use JavaVM exported from nio_util.c
>
> src/java.base/macosx/classes/sun/nio/fs/MacOSXWatchService.java line 313:
>
>> 311: private static final long kFSEventStreamEventFlagRootChanged = 0x00000020;
>> 312:
>> 313: private static final Path relativeRootPath = theFS.getPath("");
>
> Same comment as for lines 51-52. Unsure of line 311 however as that refers to a specific constant. Should that be perhaps in `UnixConstants`?
I'll change the spelling of all but `kFSEventStreamEventFlagRootChanged`, which I'd rather keep as is. The constant being spelled exactly the same as in the corresponding C header file makes it easier to check its correctness (https://developer.apple.com/documentation/coreservices/1455361-fseventstreameventflags/kfseventstreameventflagrootchanged?language=objc).
As for moving it to `UnixConstants`, I'm also not so sure as it is hardly a "Unix" constant, more like a macOS constant.
-------------
PR: https://git.openjdk.org/jdk/pull/10140
More information about the nio-dev
mailing list