jdk/src/share/classes/java/lang/invoke/BoundMethodHandle.java
changeset 13424 5de7e57cdc02
parent 13423 17843fff200d
child 13610 28122b96858e
--- a/jdk/src/share/classes/java/lang/invoke/BoundMethodHandle.java	Tue Jul 24 10:47:44 2012 -0700
+++ b/jdk/src/share/classes/java/lang/invoke/BoundMethodHandle.java	Tue Aug 07 14:31:52 2012 -0700
@@ -411,11 +411,11 @@
             SpeciesData d = lookupCache(types);
             if (!d.isPlaceholder())
                 return d;
-            Class<? extends BoundMethodHandle> cbmh;
             synchronized (d) {
                 // Use synch. on the placeholder to prevent multiple instantiation of one species.
                 // Creating this class forces a recursive call to getForClass.
-                cbmh = Factory.generateConcreteBMHClass(types);
+                if (lookupCache(types).isPlaceholder())
+                    Factory.generateConcreteBMHClass(types);
             }
             // Reacquire cache lock.
             d = lookupCache(types);