Open pjfanning opened 10 months ago
The deprecated flag is:
private final WatchKey watchKey =
directoryPath.register(
service,
new WatchEvent.Kind<?>[] {ENTRY_CREATE, ENTRY_MODIFY, ENTRY_DELETE, OVERFLOW},
// this is com.sun internal, but the service is useless on OSX without it
SensitivityWatchEventModifier.HIGH);
https://bugs.openjdk.org/browse/JDK-8307097 says:
The polling based
WatchService
has been changed to ignore these modifiers when registering files to be watched.
It seems there's no alternative...
Should we keep this open to decide if/when/how/... we can drop the reference to SensitivityWatchEventModifier.HIGH
?
Can we keep this open to remind us about the issue? At some stage, Java might announce the class is being removed and we will be forced to react.
Can we keep this open to remind us about the issue? At some stage, Java might announce the class is being removed and we will be forced to react.
Sounds reasonable to me! It probably already affects people who use the module system right now.
The CI build applies -Werror when CI build happens (see project/Common.scala)
DirectoryChangesSource.java uses a com.sun class that has been deprecated.
I tried adding
@SuppressWarnings("deprecation")
in various places but the Werror check still fails.[warn] /home/runner/work/pekko-connectors/pekko-connectors/file/src/main/java/org/apache/pekko/stream/connectors/file/impl/DirectoryChangesSource.java:103:1: com.sun.nio.file.SensitivityWatchEventModifier in com.sun.nio.file has been deprecated and marked for removal