8163946: java/lang/String/concat/WithSecurityManager.java fails after 8163878
authorredestad
Fri, 12 Aug 2016 17:35:01 +0200
changeset 40273 46a0740b18e6
parent 40272 6af4511ee5a4
child 40274 28c4614722f2
8163946: java/lang/String/concat/WithSecurityManager.java fails after 8163878 Reviewed-by: mhaupt
jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleImpl.java
jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleStatics.java
--- a/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleImpl.java	Fri Aug 12 11:30:23 2016 +0200
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleImpl.java	Fri Aug 12 17:35:01 2016 +0200
@@ -38,7 +38,6 @@
 import sun.invoke.util.ValueConversions;
 import sun.invoke.util.VerifyType;
 import sun.invoke.util.Wrapper;
-import sun.security.action.GetPropertyAction;
 
 import java.lang.reflect.Array;
 import java.util.Arrays;
@@ -59,10 +58,6 @@
  * @author jrose
  */
 /*non-public*/ abstract class MethodHandleImpl {
-    // Do not adjust this except for special platforms:
-    private static final int MAX_ARITY = Integer.decode(
-                GetPropertyAction.privilegedGetProperty(
-                        MethodHandleImpl.class.getName()+".MAX_ARITY", "255"));
 
     /// Factory methods to create method handles:
 
--- a/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleStatics.java	Fri Aug 12 11:30:23 2016 +0200
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleStatics.java	Fri Aug 12 17:35:01 2016 +0200
@@ -53,6 +53,7 @@
     static final boolean PROFILE_GWT;
     static final int CUSTOMIZE_THRESHOLD;
     static final boolean VAR_HANDLE_GUARDS;
+    static final int MAX_ARITY;
 
     static {
         Properties props = GetPropertyAction.privilegedGetProperties();
@@ -79,6 +80,10 @@
         VAR_HANDLE_GUARDS = Boolean.parseBoolean(
                 props.getProperty("java.lang.invoke.VarHandle.VAR_HANDLE_GUARDS", "true"));
 
+        // Do not adjust this except for special platforms:
+        MAX_ARITY = Integer.parseInt(
+                props.getProperty("java.lang.invoke.MethodHandleImpl.MAX_ARITY", "255"));
+
         if (CUSTOMIZE_THRESHOLD < -1 || CUSTOMIZE_THRESHOLD > 127) {
             throw newInternalError("CUSTOMIZE_THRESHOLD should be in [-1...127] range");
         }