Quantcast

RFR 8176542: Missing @Deprecated arguments for jdk.policytool

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RFR 8176542: Missing @Deprecated arguments for jdk.policytool

Weijun Wang
Please take a review on the patch below.

Notes:

1. The current javadoc output expands the arguments into sentences like
"Deprecated, for removal: This API element is subject to removal in a
future version." which means there is no need to duplicate the same
words in the @deprecated javadoc comment.

2. I don't want to duplicate the @deprecated javadoc comment in
PolicyTool.java into module-info.java, and it does not have text now.
The javadoc command has not shown an error or a warning.

Thanks
Max

diff --git a/src/jdk.policytool/share/classes/module-info.java
b/src/jdk.policytool/share/classes/module-info.java
--- a/src/jdk.policytool/share/classes/module-info.java
+++ b/src/jdk.policytool/share/classes/module-info.java
@@ -27,10 +27,9 @@
   * GUI tool for managing policy files.
   *
   * @since 9
- * @deprecated The policytool tool has been deprecated and
- * is planned to be removed in a future release.
+ * @deprecated
   */
-@Deprecated
+@Deprecated(since="9", forRemoval=true)
  module jdk.policytool {
      requires java.desktop;
      requires java.logging;
diff --git
a/src/jdk.policytool/share/classes/sun/security/tools/policytool/PolicyTool.java
b/src/jdk.policytool/share/classes/sun/security/tools/policytool/PolicyTool.java
---
a/src/jdk.policytool/share/classes/sun/security/tools/policytool/PolicyTool.java
+++
b/src/jdk.policytool/share/classes/sun/security/tools/policytool/PolicyTool.java
@@ -65,11 +65,12 @@
   *
   * @see java.security.Policy
   * @since   1.2
- * @deprecated The policytool tool has been deprecated and
- * is planned to be removed in a future release.
+ * @deprecated {@code policytool} has been deprecated for removal
because it
+ * is rarely used, and it provides little value over editing policy
+ * files using a text editor.
   */

-@Deprecated
+@Deprecated(since="9", forRemoval=true)
  public class PolicyTool {

      // for i18n
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: RFR 8176542: Missing @Deprecated arguments for jdk.policytool

Sean Mullan
Looks fine.

--Sean

On 3/11/17 5:28 AM, Weijun Wang wrote:

> Please take a review on the patch below.
>
> Notes:
>
> 1. The current javadoc output expands the arguments into sentences like
> "Deprecated, for removal: This API element is subject to removal in a
> future version." which means there is no need to duplicate the same
> words in the @deprecated javadoc comment.
>
> 2. I don't want to duplicate the @deprecated javadoc comment in
> PolicyTool.java into module-info.java, and it does not have text now.
> The javadoc command has not shown an error or a warning.
>
> Thanks
> Max
>
> diff --git a/src/jdk.policytool/share/classes/module-info.java
> b/src/jdk.policytool/share/classes/module-info.java
> --- a/src/jdk.policytool/share/classes/module-info.java
> +++ b/src/jdk.policytool/share/classes/module-info.java
> @@ -27,10 +27,9 @@
>   * GUI tool for managing policy files.
>   *
>   * @since 9
> - * @deprecated The policytool tool has been deprecated and
> - * is planned to be removed in a future release.
> + * @deprecated
>   */
> -@Deprecated
> +@Deprecated(since="9", forRemoval=true)
>  module jdk.policytool {
>      requires java.desktop;
>      requires java.logging;
> diff --git
> a/src/jdk.policytool/share/classes/sun/security/tools/policytool/PolicyTool.java
> b/src/jdk.policytool/share/classes/sun/security/tools/policytool/PolicyTool.java
>
> ---
> a/src/jdk.policytool/share/classes/sun/security/tools/policytool/PolicyTool.java
>
> +++
> b/src/jdk.policytool/share/classes/sun/security/tools/policytool/PolicyTool.java
>
> @@ -65,11 +65,12 @@
>   *
>   * @see java.security.Policy
>   * @since   1.2
> - * @deprecated The policytool tool has been deprecated and
> - * is planned to be removed in a future release.
> + * @deprecated {@code policytool} has been deprecated for removal
> because it
> + * is rarely used, and it provides little value over editing policy
> + * files using a text editor.
>   */
>
> -@Deprecated
> +@Deprecated(since="9", forRemoval=true)
>  public class PolicyTool {
>
>      // for i18n
Loading...