When studying the jdk source code (jdk 1.8.0_111), i found a piece of strange code as follow:
public class AtmicBoolean implements Serializable {
private static final long serialVersionUID = 4654671469794556979L;
private static final Unsafe unsafe = ;
private static final long valueOffset;
private volatile int value;
static {
try {
valueOffset = unsafe.objectFieldOffset(AtomicBoolean.class.getDeclaredField("value"));
} catch (Exception localException) {
throw new Error(localException);
}
}
// .... other codes
}
Question: where does the unsafe variable was set ?