changeset 11612:aa3eb5864c82

8148522: Backout JDK-8138811 from 2016 Apr CPU repo Reviewed-by: igerasim
author asaha
date Thu, 28 Jan 2016 17:06:19 -0800
parents affdf0935a10
children 28f4d890c562
files src/share/classes/java/security/ProtectionDomain.java src/share/classes/javax/security/auth/SubjectDomainCombiner.java src/share/classes/sun/misc/JavaSecurityProtectionDomainAccess.java
diffstat 3 files changed, 1 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/java/security/ProtectionDomain.java	Mon Jan 25 12:34:06 2016 -0800
+++ b/src/share/classes/java/security/ProtectionDomain.java	Thu Jan 28 17:06:19 2016 -0800
@@ -475,11 +475,6 @@
                         }
                     };
                 }
-
-                @Override
-                public boolean getStaticPermissionsField(ProtectionDomain pd) {
-                    return pd.staticPermissions;
-                }
             });
     }
 }
--- a/src/share/classes/javax/security/auth/SubjectDomainCombiner.java	Mon Jan 25 12:34:06 2016 -0800
+++ b/src/share/classes/javax/security/auth/SubjectDomainCombiner.java	Thu Jan 28 17:06:19 2016 -0800
@@ -37,8 +37,6 @@
 import java.util.Set;
 import java.util.WeakHashMap;
 import java.lang.ref.WeakReference;
-import sun.misc.SharedSecrets;
-import sun.misc.JavaSecurityProtectionDomainAccess;
 
 /**
  * A {@code SubjectDomainCombiner} updates ProtectionDomains
@@ -67,9 +65,6 @@
     private static final boolean allowCaching =
                                         (useJavaxPolicy && cachePolicy());
 
-    private static final JavaSecurityProtectionDomainAccess pdAccess =
-        SharedSecrets.getJavaSecurityProtectionDomainAccess();
-
     /**
      * Associate the provided {@code Subject} with this
      * {@code SubjectDomainCombiner}.
@@ -244,15 +239,10 @@
                 subjectPd = cachedPDs.getValue(pd);
 
                 if (subjectPd == null) {
-                    if (pdAccess.getStaticPermissionsField(pd)) {
-                        // Need to keep static ProtectionDomain objects static
-                        subjectPd = pd;
-                    } else {
-                        subjectPd = new ProtectionDomain(pd.getCodeSource(),
+                    subjectPd = new ProtectionDomain(pd.getCodeSource(),
                                                 pd.getPermissions(),
                                                 pd.getClassLoader(),
                                                 principals);
-                    }
                     cachedPDs.putValue(pd, subjectPd);
                 } else {
                     allNew = false;
--- a/src/share/classes/sun/misc/JavaSecurityProtectionDomainAccess.java	Mon Jan 25 12:34:06 2016 -0800
+++ b/src/share/classes/sun/misc/JavaSecurityProtectionDomainAccess.java	Thu Jan 28 17:06:19 2016 -0800
@@ -36,9 +36,4 @@
      * Returns the ProtectionDomainCache.
      */
     ProtectionDomainCache getProtectionDomainCache();
-
-    /**
-     * Returns the staticPermissions field of the specified object
-     */
-    boolean getStaticPermissionsField(ProtectionDomain pd);
 }