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

Add (since="9", forRemoval=true) to @Deprecated annotation on HostServices.getWebContext

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 9
    • javafx

      JDK-8156963 added the @Deprecated annotation to the HostServices.getWebContext method. We also need to add (since = "9", forRemoval=true) to the annotation, but cannot do so until we move to a newer version of JDK 9 that supports the "since" and "forRemoval" properties on the annotation.

      Once we do upgrade to a newer compiler, the fix will be:

      diff --git a/modules/graphics/src/main/java/javafx/application/HostServices.java
       b/modules/graphics/src/main/java/javafx/application/HostServices.java
      --- a/modules/graphics/src/main/java/javafx/application/HostServices.java
      +++ b/modules/graphics/src/main/java/javafx/application/HostServices.java
      @@ -154,7 +154,7 @@
            * @deprecated This method is deprecated as of JDK 9 because the
            * {@link java.applet.Applet Applet} API is deprecated.
            */
      - @Deprecated // FIXME: (since = "9")
      + @Deprecated(since="9", forRemoval=true)
           public final JSObject getWebContext() {
               return delegate.getWebContext();
           }

            ckyang Chien Yang (Inactive)
            kcr Kevin Rushforth
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: