On 06/09/2013 12:17 AM, Peter Levart wrote: > In case the loop retries, there's no need to construct another WeakEntry... > > T interned; > WeakEntry<T> e = new WeakEntry<>(elem, stale); > do { > expungeStaleElements(); > WeakEntry<T> exist = map.putIfAbsent(e, e); > interned = (exist == null)? elem: exist.get(); > } while (interned == null); > return interned;
That's right, thanks! The update is here: http://cr.openjdk.java.net/~shade/7177472/webrev.02/ Testing: - Linux x86_64 builds OK - Linux x86_64 java/lang/invoke/ jtreg passes OK - The microbenchmark scores in the original note are still the same -Aleksey.