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

Add since=9 deprecation information to javax.lang.model classes

    Details

    • Type: CSR
    • Status: Closed
    • Priority: P4
    • Resolution: Approved
    • Fix Version/s: 10
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Compatibility Risk:
      minimal
    • Interface Kind:
      Java API
    • Scope:
      SE

      Description

      Summary

      Add @since information to deprecated items in javax.lang.model.

      Problem

      While the java.lang.Deprecated annotation type was added in JDK 9, since the types in javax.lang.model are bootstrapped using the previous release, this functionality could not be used with this API until JDK 10.

      Solution

      Add the @since information that had to be omitted in JDK 9.

      Specification

      --- a/src/java.compiler/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor6.java    Thu Oct 26 16:57:35 2017 -0700
      +++ b/src/java.compiler/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor6.java    Thu Oct 26 17:06:52 2017 -0700
      @@ -75,7 +75,7 @@
            * @deprecated Release 6 is obsolete; update to a visitor for a newer
            * release level.
            */
      -    @Deprecated
      +    @Deprecated(since="9")
           protected AbstractAnnotationValueVisitor6() {}
      
           /**
      --- a/src/java.compiler/share/classes/javax/lang/model/util/AbstractElementVisitor6.java    Thu Oct 26 16:57:35 2017 -0700
      +++ b/src/java.compiler/share/classes/javax/lang/model/util/AbstractElementVisitor6.java    Thu Oct 26 17:06:52 2017 -0700
      @@ -75,7 +75,7 @@
            * @deprecated Release 6 is obsolete; update to a visitor for a newer
            * release level.
            */
      -    @Deprecated
      +    @Deprecated(since="9")
           protected AbstractElementVisitor6(){}
      
           /**
      --- a/src/java.compiler/share/classes/javax/lang/model/util/AbstractTypeVisitor6.java   Thu Oct 26 16:57:35 2017 -0700
      +++ b/src/java.compiler/share/classes/javax/lang/model/util/AbstractTypeVisitor6.java   Thu Oct 26 17:06:52 2017 -0700
      @@ -74,7 +74,7 @@
            * @deprecated Release 6 is obsolete; update to a visitor for a newer
            * release level.
            */
      -    @Deprecated
      +    @Deprecated(since="9")
           protected AbstractTypeVisitor6() {}
      
           /**
      --- a/src/java.compiler/share/classes/javax/lang/model/util/ElementKindVisitor6.java    Thu Oct 26 16:57:35 2017 -0700
      +++ b/src/java.compiler/share/classes/javax/lang/model/util/ElementKindVisitor6.java    Thu Oct 26 17:06:52 2017 -0700
      @@ -91,7 +91,7 @@
            * @deprecated Release 6 is obsolete; update to a visitor for a newer
            * release level.
            */
      -    @Deprecated
      +    @Deprecated(since="9")
           protected ElementKindVisitor6() {
               super(null);
           }
      @@ -104,7 +104,7 @@
            * @deprecated Release 6 is obsolete; update to a visitor for a newer
            * release level.
            */
      -    @Deprecated
      +    @Deprecated(since="9")
           protected ElementKindVisitor6(R defaultValue) {
               super(defaultValue);
           }
      --- a/src/java.compiler/share/classes/javax/lang/model/util/ElementScanner6.java    Thu Oct 26 16:57:35 2017 -0700
      +++ b/src/java.compiler/share/classes/javax/lang/model/util/ElementScanner6.java    Thu Oct 26 17:06:52 2017 -0700
      @@ -106,7 +106,7 @@
            * @deprecated Release 6 is obsolete; update to a visitor for a newer
            * release level.
            */
      -    @Deprecated
      +    @Deprecated(since="9")
           protected ElementScanner6(){
               DEFAULT_VALUE = null;
           }
      @@ -119,7 +119,7 @@
            * @deprecated Release 6 is obsolete; update to a visitor for a newer
            * release level.
            */
      -    @Deprecated
      +    @Deprecated(since="9")
           protected ElementScanner6(R defaultValue){
               DEFAULT_VALUE = defaultValue;
           }
      --- a/src/java.compiler/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor6.java  Thu Oct 26 16:57:35 2017 -0700
      +++ b/src/java.compiler/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor6.java  Thu Oct 26 17:06:52 2017 -0700
      @@ -92,7 +92,7 @@
            * @deprecated Release 6 is obsolete; update to a visitor for a newer
            * release level.
            */
      -    @Deprecated
      +    @Deprecated(since="9")
           protected SimpleAnnotationValueVisitor6() {
               super();
               DEFAULT_VALUE = null;
      @@ -106,7 +106,7 @@
            * @deprecated Release 6 is obsolete; update to a visitor for a newer
            * release level.
            */
      -    @Deprecated
      +    @Deprecated(since="9")
           protected SimpleAnnotationValueVisitor6(R defaultValue) {
               super();
               DEFAULT_VALUE = defaultValue;
      --- a/src/java.compiler/share/classes/javax/lang/model/util/SimpleElementVisitor6.java  Thu Oct 26 16:57:35 2017 -0700
      +++ b/src/java.compiler/share/classes/javax/lang/model/util/SimpleElementVisitor6.java  Thu Oct 26 17:06:52 2017 -0700
      @@ -94,7 +94,7 @@
            * @deprecated Release 6 is obsolete; update to a visitor for a newer
            * release level.
            */
      -    @Deprecated
      +    @Deprecated(since="9")
           protected SimpleElementVisitor6(){
               DEFAULT_VALUE = null;
           }
      @@ -107,7 +107,7 @@
            * @deprecated Release 6 is obsolete; update to a visitor for a newer
            * release level.
            */
      -    @Deprecated
      +    @Deprecated(since="9")
           protected SimpleElementVisitor6(R defaultValue){
               DEFAULT_VALUE = defaultValue;
           }
      --- a/src/java.compiler/share/classes/javax/lang/model/util/SimpleTypeVisitor6.java Thu Oct 26 16:57:35 2017 -0700
      +++ b/src/java.compiler/share/classes/javax/lang/model/util/SimpleTypeVisitor6.java Thu Oct 26 17:06:52 2017 -0700
      @@ -94,7 +94,7 @@
            * @deprecated Release 6 is obsolete; update to a visitor for a newer
            * release level.
            */
      -    @Deprecated
      +    @Deprecated(since="9")
           protected SimpleTypeVisitor6(){
               DEFAULT_VALUE = null;
           }
      @@ -107,7 +107,7 @@
            * @deprecated Release 6 is obsolete; update to a visitor for a newer
            * release level.
            */
      -    @Deprecated
      +    @Deprecated(since="9")
           protected SimpleTypeVisitor6(R defaultValue){
               DEFAULT_VALUE = defaultValue;
           }
      --- a/src/java.compiler/share/classes/javax/lang/model/util/TypeKindVisitor6.java   Thu Oct 26 16:57:35 2017 -0700
      +++ b/src/java.compiler/share/classes/javax/lang/model/util/TypeKindVisitor6.java   Thu Oct 26 17:06:52 2017 -0700
      @@ -85,7 +85,7 @@
            * @deprecated Release 6 is obsolete; update to a visitor for a newer
            * release level.
            */
      -    @Deprecated
      +    @Deprecated(since="9")
           protected TypeKindVisitor6() {
               super(null);
           }
      @@ -99,7 +99,7 @@
            * @deprecated Release 6 is obsolete; update to a visitor for a newer
            * release level.
            */
      -    @Deprecated
      +    @Deprecated(since="9")
           protected TypeKindVisitor6(R defaultValue) {
               super(defaultValue);
           }
      --- a/src/java.compiler/share/classes/javax/tools/ToolProvider.java Thu Oct 26 16:57:35 2017 -0700
      +++ b/src/java.compiler/share/classes/javax/tools/ToolProvider.java Thu Oct 26 17:06:52 2017 -0700
      @@ -1,5 +1,5 @@
       /*
      - * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
      + * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
        * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
        *
        * This code is free software; you can redistribute it and/or modify it
      @@ -96,7 +96,7 @@
            * locate system tools as well as user-installed tools.
            * @return a class loader, or {@code null}
            */
      -    @Deprecated
      +    @Deprecated(since="9")
           public static ClassLoader getSystemToolClassLoader() {
               return null;
           }

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                darcy Joe Darcy
                Reporter:
                darcy Joe Darcy
                Reviewed By:
                Jonathan Gibbons, Vicente Arturo Romero Zaldivar
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: