Unsafe has a method for initializing classes:
Unsafe.ensureClassInitialized(Class) line: not available [native method]
I suspect that this type of initialization does not block the class like regular java class loading, because I sometimes came across some impossible situations. I can give more details later if necessary, but does anyone know if the loading class has Unsafe using such quirks?
Btw, here's a short stack trace of how this class loads:
Unsafe.ensureClassInitialized(Class) line: not available [native method]
UnsafeFieldAccessorFactory.newFieldAccessor(Field, boolean) line: 25
ReflectionFactory.newFieldAccessor(Field, boolean) line: 122
Field.acquireFieldAccessor(boolean) line: 918
Field.getFieldAccessor(Object) line: 899
Field.get(Object) line: 358
source
share