< prev index next >
src/java.base/share/classes/java/util/concurrent/atomic/AtomicInteger.java
Print this page
rev 17358 : 8182487: Add Unsafe.objectFieldOffset(Class, String)
Reviewed-by: dsimms
@@ -60,16 +60,11 @@
*/
private static final jdk.internal.misc.Unsafe U = jdk.internal.misc.Unsafe.getUnsafe();
private static final long VALUE;
static {
- try {
- VALUE = U.objectFieldOffset
- (AtomicInteger.class.getDeclaredField("value"));
- } catch (ReflectiveOperationException e) {
- throw new Error(e);
- }
+ VALUE = U.objectFieldOffset(AtomicInteger.class, "value");
}
private volatile int value;
/**
< prev index next >