diff -r b606aa2b32d1 -r 489f8e536bc0 jdk/src/java.base/share/classes/java/lang/invoke/BoundMethodHandle.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 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; }