Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8303188

(fs) Deprecate com.sun.nio.file.SensitivityWatchEventModifier for removal

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P4 P4
    • 21
    • core-libs
    • None
    • behavioral
    • minimal
    • Projects which use this API will be warned that it will be removed.
    • Java API
    • JDK

      Summary

      Deprecate com.sun.nio.file.SensitivityWatchEventModifier in the jdk.unsupported module.

      Problem

      This enum is only used by the polling implementation of java.nio.file.WatchService WatchService. The polling WatchService is used only on macOS and likely to be removed in a future release when a version based on the native file event notification facility becomes available.

      Solution

      Deprecate com.sun.nio.file.SensitivityWatchEventModifier. This will notify any users and provide an opportunity for them to cease use of this API.

      Specification

              --- a/src/jdk.unsupported/share/classes/com/sun/nio/file/SensitivityWatchEventModifier.java
              +++ b/src/jdk.unsupported/share/classes/com/sun/nio/file/SensitivityWatchEventModifier.java
      @@ -30,13 +30,22 @@
      
       /**
        * Defines the <em>sensitivity levels</em> when registering objects with a
        * watch service implementation that polls the file system.
        *
      + * @deprecated
      + * The sensitivity levels were historically used by polling-based
      + * {@link java.nio.file.WatchService WatchService} implementations to configure
      + * the polling interval. They are are no longer used. The {@code WatchService}
      + * implementations in the JDK ignore these {@link java.nio.file.WatchEvent
      + * WatchEvent} modifiers if they are specified when registering a directory
      + * to be watched.
      + *
        * @since 1.7
        */
      
      +@Deprecated(since="21", forRemoval = true)

            bpb Brian Burkhalter
            bpb Brian Burkhalter
            Alan Bateman
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: