changeset 15233:5584be31a8f9

8161506: Deprecate pre-1.2 SecurityManager methods and fields with forRemoval=true Reviewed-by: coleenp, jnimeh, xuelei
author mullan
date Mon, 01 Aug 2016 09:58:36 -0400
parents 17a073876794
children 99a010b704b6 6317053ba4f3 45b3bb1b2c10
files src/java.base/share/classes/java/lang/SecurityManager.java
diffstat 1 files changed, 25 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/java/lang/SecurityManager.java	Mon Aug 01 15:55:54 2016 +0900
+++ b/src/java.base/share/classes/java/lang/SecurityManager.java	Mon Aug 01 09:58:36 2016 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2016, 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
@@ -227,9 +227,10 @@
      *
      * @deprecated This type of security checking is not recommended.
      *  It is recommended that the <code>checkPermission</code>
-     *  call be used instead.
+     *  call be used instead. This field is subject to removal in a
+     *  future version of Java SE.
      */
-    @Deprecated(since="1.2")
+    @Deprecated(since="1.2", forRemoval=true)
     protected boolean inCheck;
 
     /*
@@ -260,9 +261,10 @@
      * @see     java.lang.SecurityManager#inCheck
      * @deprecated This type of security checking is not recommended.
      *  It is recommended that the <code>checkPermission</code>
-     *  call be used instead.
+     *  call be used instead. This method is subject to removal in a
+     *  future version of Java SE.
      */
-    @Deprecated(since="1.2")
+    @Deprecated(since="1.2", forRemoval=true)
     public boolean getInCheck() {
         return inCheck;
     }
@@ -340,12 +342,13 @@
      *
      * @deprecated This type of security checking is not recommended.
      *  It is recommended that the <code>checkPermission</code>
-     *  call be used instead.
+     *  call be used instead. This method is subject to removal in a
+     *  future version of Java SE.
      *
      * @see  java.lang.ClassLoader#getSystemClassLoader() getSystemClassLoader
      * @see  #checkPermission(java.security.Permission) checkPermission
      */
-    @Deprecated(since="1.2")
+    @Deprecated(since="1.2", forRemoval=true)
     protected ClassLoader currentClassLoader() {
         ClassLoader cl = currentClassLoader0();
         if ((cl != null) && hasAllPermission())
@@ -386,12 +389,13 @@
      *
      * @deprecated This type of security checking is not recommended.
      *  It is recommended that the <code>checkPermission</code>
-     *  call be used instead.
+     *  call be used instead. This method is subject to removal in a
+     *  future version of Java SE.
      *
      * @see  java.lang.ClassLoader#getSystemClassLoader() getSystemClassLoader
      * @see  #checkPermission(java.security.Permission) checkPermission
      */
-    @Deprecated(since="1.2")
+    @Deprecated(since="1.2", forRemoval=true)
     protected Class<?> currentLoadedClass() {
         Class<?> c = currentLoadedClass0();
         if ((c != null) && hasAllPermission())
@@ -408,10 +412,10 @@
      *          <code>-1</code> if such a frame cannot be found.
      * @deprecated This type of security checking is not recommended.
      *  It is recommended that the <code>checkPermission</code>
-     *  call be used instead.
-     *
+     *  call be used instead. This method is subject to removal in a
+     *  future version of Java SE.
      */
-    @Deprecated(since="1.2")
+    @Deprecated(since="1.2", forRemoval=true)
     protected native int classDepth(String name);
 
     /**
@@ -444,12 +448,13 @@
      *
      * @deprecated This type of security checking is not recommended.
      *  It is recommended that the <code>checkPermission</code>
-     *  call be used instead.
+     *  call be used instead. This method is subject to removal in a
+     *  future version of Java SE.
      *
      * @see   java.lang.ClassLoader#getSystemClassLoader() getSystemClassLoader
      * @see   #checkPermission(java.security.Permission) checkPermission
      */
-    @Deprecated(since="1.2")
+    @Deprecated(since="1.2", forRemoval=true)
     protected int classLoaderDepth() {
         int depth = classLoaderDepth0();
         if (depth != -1) {
@@ -472,9 +477,10 @@
      *         name is on the execution stack; <code>false</code> otherwise.
      * @deprecated This type of security checking is not recommended.
      *  It is recommended that the <code>checkPermission</code>
-     *  call be used instead.
+     *  call be used instead. This method is subject to removal in a
+     *  future version of Java SE.
      */
-    @Deprecated(since="1.2")
+    @Deprecated(since="1.2", forRemoval=true)
     protected boolean inClass(String name) {
         return classDepth(name) >= 0;
     }
@@ -488,10 +494,11 @@
      *
      * @deprecated This type of security checking is not recommended.
      *  It is recommended that the <code>checkPermission</code>
-     *  call be used instead.
+     *  call be used instead. This method is subject to removal in a
+     *  future version of Java SE.
      * @see        #currentClassLoader() currentClassLoader
      */
-    @Deprecated(since="1.2")
+    @Deprecated(since="1.2", forRemoval=true)
     protected boolean inClassLoader() {
         return currentClassLoader() != null;
     }