On Fri, 24 Feb 2023 19:04:33 GMT, Brian Burkhalter <b...@openjdk.org> wrote:

>> Deprecate `SensitivityWatchEventModifier` for now instead of directly 
>> removing it as proposed in #12626.
>
> Brian Burkhalter has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   8303175: Move @deprecated above @since; tweak verbiage

src/jdk.unsupported/share/classes/com/sun/nio/file/SensitivityWatchEventModifier.java
 line 40:

> 38:  * {@code WatchService} is used only on macOS and likely to be removed
> 39:  * in a future release when a version based on the native file event
> 40:  * notification facility becomes available.

I agree it's time to deprecate this extension but I think the reasoning will 
need a few rounds to get right. As background, JDK-8285956 changed the default 
sensitivity from medium to high in JDK 19 so the need to bump the event (and 
thus reducing the polling interval) has mostly gone away. So maybe we should 
thinking about changing PollingWatchService it to ignore the these modifiers 
(like it is done with the native implementations). If we did that then it would 
be easy to word the deprecation text as it could just say that the modifier 
originally provided a hint to polling based WatchService implementations but is 
no longer used.

src/jdk.unsupported/share/classes/com/sun/nio/file/SensitivityWatchEventModifier.java
 line 45:

> 43:  */
> 44: 
> 45: @Deprecated(since="7", forRemoval = true)

I assume this should be "21" rather than "7"

-------------

PR: https://git.openjdk.org/jdk/pull/12746

Reply via email to