diff -r 72b63ee33f57 -r 17843fff200d jdk/src/share/classes/sun/misc/Unsafe.java --- a/jdk/src/share/classes/sun/misc/Unsafe.java Thu Jul 12 00:12:52 2012 -0700 +++ b/jdk/src/share/classes/sun/misc/Unsafe.java Tue Jul 24 10:47:44 2012 -0700 @@ -678,6 +678,14 @@ public native Object staticFieldBase(Field f); /** + * Detect if the given class may need to be initialized. This is often + * needed in conjunction with obtaining the static field base of a + * class. + * @return false only if a call to {@code ensureClassInitialized} would have no effect + */ + public native boolean shouldBeInitialized(Class c); + + /** * Ensure the given class has been initialized. This is often * needed in conjunction with obtaining the static field base of a * class.