Fix style check error for UnsafeDetectUtil.java

This commit is contained in:
Ngoc Dao 2012-01-26 23:01:51 +09:00
parent 6c68773ad4
commit 4396b421f1

View File

@ -39,18 +39,19 @@ public final class UnsafeDetectUtil {
} catch (ClassNotFoundException e) { } catch (ClassNotFoundException e) {
return false; return false;
} catch (SecurityException e) { } catch (SecurityException e) {
return false; return false;
} catch (PrivilegedActionException e) { } catch (PrivilegedActionException e) {
return false; return false;
} }
} }
private static boolean hasUnsafeField(final Class<?> unsafeClass) throws PrivilegedActionException { private static boolean hasUnsafeField(final Class<?> unsafeClass) throws PrivilegedActionException {
return AccessController.doPrivileged (new PrivilegedExceptionAction<Boolean>() { return AccessController.doPrivileged(new PrivilegedExceptionAction<Boolean>() {
public Boolean run() throws Exception { public Boolean run() throws Exception {
unsafeClass.getDeclaredField(THE_UNSAFE); unsafeClass.getDeclaredField(THE_UNSAFE);
return true; return true;
}}); }
});
} }
public static boolean isUnsafeFound() { public static boolean isUnsafeFound() {