In Unsafe.java I see:
* @exception SecurityException if a security manager exists and its
* <code>checkPropertiesAccess</code> method doesn't allow
* access to the system properties.
*/
@CallerSensitive
public static Unsafe getUnsafe() {
Class<?> caller = Reflection.getCallerClass();
if (!VM.isSystemDomainLoader(caller.getClassLoader()))
throw new SecurityException("Unsafe");
return theUnsafe;
}
but the spec looks wrong because it doesn't check whether there is a security manager, unlike code elsewhere. And what's up with checkPropertiesAccess?
* @exception SecurityException if a security manager exists and its
* <code>checkPropertiesAccess</code> method doesn't allow
* access to the system properties.
*/
@CallerSensitive
public static Unsafe getUnsafe() {
Class<?> caller = Reflection.getCallerClass();
if (!VM.isSystemDomainLoader(caller.getClassLoader()))
throw new SecurityException("Unsafe");
return theUnsafe;
}
but the spec looks wrong because it doesn't check whether there is a security manager, unlike code elsewhere. And what's up with checkPropertiesAccess?