8136967: revert all changes applied to obtain information about 8131129
authormhaupt
Tue, 27 Oct 2015 09:09:37 +0100
changeset 33312 489f8e536bc0
parent 33311 b606aa2b32d1
child 33313 de27000120de
8136967: revert all changes applied to obtain information about 8131129 Reviewed-by: sundar
jdk/src/java.base/share/classes/java/lang/invoke/BoundMethodHandle.java
jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleStatics.java
jdk/test/java/lang/invoke/LFCaching/LFMultiThreadCachingTest.java
--- a/jdk/src/java.base/share/classes/java/lang/invoke/BoundMethodHandle.java	Wed Oct 07 15:29:55 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/BoundMethodHandle.java	Tue Oct 27 09:09:37 2015 +0100
@@ -404,14 +404,6 @@
             d = lookupCache(types);
             // Class loading must have upgraded the cache.
             assert(d != null && !d.isPlaceholder());
-            if (OBSERVE_BMH_SPECIES_CREATION) {
-                if (d == null) {
-                    throw new IllegalStateException("d == null");
-                }
-                if (d.isPlaceholder()) {
-                    throw new IllegalStateException("d is place holder");
-                }
-            }
             return d;
         }
         static SpeciesData getForClass(String types, Class<? extends BoundMethodHandle> clazz) {
@@ -423,9 +415,6 @@
             if (d != null)  return d;
             d = new SpeciesData(types);
             assert(d.isPlaceholder());
-            if (OBSERVE_BMH_SPECIES_CREATION && !d.isPlaceholder()) {
-                throw new IllegalStateException("d is not place holder");
-            }
             CACHE.put(types, d);
             return d;
         }
@@ -433,15 +422,6 @@
             SpeciesData d2;
             assert((d2 = CACHE.get(types)) == null || d2.isPlaceholder());
             assert(!d.isPlaceholder());
-            if (OBSERVE_BMH_SPECIES_CREATION) {
-                d2 = CACHE.get(types);
-                if (d2 != null && !d2.isPlaceholder()) {
-                    throw new IllegalStateException("non-null d2 is not place holder");
-                }
-                if (d.isPlaceholder()) {
-                    throw new IllegalStateException("d is place holder");
-                }
-            }
             CACHE.put(types, d);
             return d;
         }
--- a/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleStatics.java	Wed Oct 07 15:29:55 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleStatics.java	Tue Oct 27 09:09:37 2015 +0100
@@ -51,12 +51,8 @@
     static final boolean PROFILE_GWT;
     static final int CUSTOMIZE_THRESHOLD;
 
-    // This is a temporary property added for improved error reporting; it will
-    // be removed once it has served its purpose.
-    static final boolean OBSERVE_BMH_SPECIES_CREATION;
-
     static {
-        final Object[] values = new Object[10];
+        final Object[] values = new Object[9];
         AccessController.doPrivileged(new PrivilegedAction<>() {
                 public Void run() {
                     values[0] = Boolean.getBoolean("java.lang.invoke.MethodHandle.DEBUG_NAMES");
@@ -68,7 +64,6 @@
                     values[6] = Integer.getInteger("java.lang.invoke.MethodHandle.PROFILE_LEVEL", 0);
                     values[7] = Boolean.parseBoolean(System.getProperty("java.lang.invoke.MethodHandle.PROFILE_GWT", "true"));
                     values[8] = Integer.getInteger("java.lang.invoke.MethodHandle.CUSTOMIZE_THRESHOLD", 127);
-                    values[9] = Boolean.getBoolean("java.lang.invoke.MethodHandle.OBSERVE_BMH_SPECIES_CREATION");
                     return null;
                 }
             });
@@ -82,8 +77,6 @@
         PROFILE_GWT               = (Boolean) values[7];
         CUSTOMIZE_THRESHOLD       = (Integer) values[8];
 
-        OBSERVE_BMH_SPECIES_CREATION = (Boolean) values[9];
-
         if (CUSTOMIZE_THRESHOLD < -1 || CUSTOMIZE_THRESHOLD > 127) {
             throw newInternalError("CUSTOMIZE_THRESHOLD should be in [-1...127] range");
         }
--- a/jdk/test/java/lang/invoke/LFCaching/LFMultiThreadCachingTest.java	Wed Oct 07 15:29:55 2015 +0200
+++ b/jdk/test/java/lang/invoke/LFCaching/LFMultiThreadCachingTest.java	Tue Oct 27 09:09:37 2015 +0100
@@ -32,7 +32,7 @@
  * @build LambdaFormTestCase
  * @build LFCachingTestCase
  * @build LFMultiThreadCachingTest
- * @run main/othervm -Djava.lang.invoke.MethodHandle.OBSERVE_BMH_SPECIES_CREATION=true LFMultiThreadCachingTest
+ * @run main/othervm LFMultiThreadCachingTest
  */
 
 import java.lang.invoke.MethodHandle;