ICU-13335 make CacheValue.SoftValue.ref volatile

X-SVN-Rev: 40489
This commit is contained in:
Markus Scherer 2017-09-27 22:59:32 +00:00
parent f0bfac70f5
commit 0d9ef38e4c

View file

@ -129,7 +129,7 @@ public abstract class CacheValue<V> {
}
private static final class SoftValue<V> extends CacheValue<V> {
private Reference<V> ref;
private volatile Reference<V> ref; // volatile for unsynchronized get()
SoftValue(V value) { ref = new SoftReference<V>(value); }
@Override