< prev index next >

src/java.base/share/classes/jdk/internal/reflect/UnsafeQualifiedStaticObjectFieldAccessorImpl.java

Print this page

        

*** 33,43 **** UnsafeQualifiedStaticObjectFieldAccessorImpl(Field field, boolean isReadOnly) { super(field, isReadOnly); } public Object get(Object obj) throws IllegalArgumentException { ! return unsafe.getObjectVolatile(base, fieldOffset); } public boolean getBoolean(Object obj) throws IllegalArgumentException { throw newGetBooleanIllegalArgumentException(); } --- 33,43 ---- UnsafeQualifiedStaticObjectFieldAccessorImpl(Field field, boolean isReadOnly) { super(field, isReadOnly); } public Object get(Object obj) throws IllegalArgumentException { ! return unsafe.getReferenceVolatile(base, fieldOffset); } public boolean getBoolean(Object obj) throws IllegalArgumentException { throw newGetBooleanIllegalArgumentException(); }
*** 79,89 **** if (value != null) { if (!field.getType().isAssignableFrom(value.getClass())) { throwSetIllegalArgumentException(value); } } ! unsafe.putObjectVolatile(base, fieldOffset, value); } public void setBoolean(Object obj, boolean z) throws IllegalArgumentException, IllegalAccessException { --- 79,89 ---- if (value != null) { if (!field.getType().isAssignableFrom(value.getClass())) { throwSetIllegalArgumentException(value); } } ! unsafe.putReferenceVolatile(base, fieldOffset, value); } public void setBoolean(Object obj, boolean z) throws IllegalArgumentException, IllegalAccessException {
< prev index next >