8039520: More atomicity of atomic updates

Reviewed-by: dl, skoivu, igerasim
This commit is contained in:
Chris Hegarty 2014-04-24 16:52:45 +01:00
parent 6d03ea4ffe
commit db34776a9e

View File

@ -334,6 +334,8 @@ public abstract class AtomicReferenceFieldUpdater<T,V> {
if (vclass != fieldClass)
throw new ClassCastException();
if (vclass.isPrimitive())
throw new IllegalArgumentException("Must be reference type");
if (!Modifier.isVolatile(modifiers))
throw new IllegalArgumentException("Must be volatile type");