--- old/src/java.base/share/classes/java/lang/invoke/BoundMethodHandle.java 2015-10-26 16:10:24.000000000 +0100 +++ new/src/java.base/share/classes/java/lang/invoke/BoundMethodHandle.java 2015-10-26 16:10:24.000000000 +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; }