changeset 15368:d755483dc031

8163946: java/lang/String/concat/WithSecurityManager.java fails after 8163878 Reviewed-by: mhaupt
author redestad
date Fri, 12 Aug 2016 17:35:01 +0200
parents 1fcefbcdd542
children 011f83649452
files src/java.base/share/classes/java/lang/invoke/MethodHandleImpl.java src/java.base/share/classes/java/lang/invoke/MethodHandleStatics.java
diffstat 2 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/java/lang/invoke/MethodHandleImpl.java	Fri Aug 12 11:30:23 2016 +0200
+++ b/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/src/java.base/share/classes/java/lang/invoke/MethodHandleStatics.java	Fri Aug 12 11:30:23 2016 +0200
+++ b/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");
         }