JDK-8303097 : (fs) Remove com.sun.nio.file.SensitivityWatchEventModifier
  • Type: CSR
  • Component: core-libs
  • Sub-Component: java.nio
  • Priority: P4
  • Status: Closed
  • Resolution: Withdrawn
  • Fix Versions: tbd
  • Submitted: 2023-02-22
  • Updated: 2023-02-24
  • Resolved: 2023-02-24
Related Reports
CSR :  
Relates :  
Description
Summary
-------

Remove `com.sun.nio.file.SensitivityWatchEventModifier` from the `jdk.unsupported` module.

Problem
-------

Source code searches do not reveal any use of `com.sun.nio.file.SensitivityWatchEventModifier` so there is unlikely to be any point to retaining it.

Solution
--------

Remove `com.sun.nio.file.SensitivityWatchEventModifier` and its use in the generic `WatchService` implementation `sun.nio.fs.PollingWatchService`.

Specification
-------------

There are no specification changes.


Comments
The com.sun.nio.file.* APIs have provided JDK-specific extensions to the standard API since JDK 7 but were never documented. In JDK 9 we decided to include them in the jdk.unsupported module as a "critical internal API" (see [JEP 260][1]). If there is no evidence of usage of com.sun.nio.file.SensitivityWatchEventModifier and I think the question is whether it is okay to remove it without notice, or deprecate it for removal in 21, and remove it in a release after that. Update: I did a search of 130k artifacts from Maven Central and found 62 usages in 62 classes so I think there is at least some usage, e.g. Alpakka project. So I think we might have to hold off removing and just deprecate for removal instead. [1]: https://openjdk.org/jeps/260
24-02-2023