/** * Clear a property, doing a faster permission check that skips having to execute a privileged action frame. * * @param name the property name * @return the previous property value, or {@code null} if there was none */ public static String clearPropertyPrivileged(String name) { final SecurityManager sm = getSecurityManager(); if (sm == null) { return clearProperty(name); } if (sm instanceof WildFlySecurityManager) { final Context ctx = CTX.get(); if (! ctx.checking) { return clearProperty(name); } ctx.checking = false; try { checkPropertyWritePermission(getCallerClass(2), name); return clearProperty(name); } finally { ctx.checking = true; } } else { checkPropertyWritePermission(getCallerClass(2), name); return doPrivileged(new ClearPropertyAction(name)); } }
/** * Clear a property, doing a faster permission check that skips having to execute a privileged action frame. * * @param name the property name * @return the previous property value, or {@code null} if there was none */ public static String clearPropertyPrivileged(String name) { final SecurityManager sm = getSecurityManager(); if (sm == null) { return clearProperty(name); } if (sm instanceof WildFlySecurityManager) { final Context ctx = CTX.get(); if (! ctx.checking) { return clearProperty(name); } ctx.checking = false; try { checkPropertyWritePermission(getCallerClass(2), name); return clearProperty(name); } finally { ctx.checking = true; } } else { checkPropertyWritePermission(getCallerClass(2), name); return doPrivileged(new ClearPropertyAction(name)); } }
/** * Clear a property, doing a faster permission check that skips having to execute a privileged action frame. * * @param name the property name * @return the previous property value, or {@code null} if there was none */ public static String clearPropertyPrivileged(String name) { final SecurityManager sm = getSecurityManager(); if (sm == null) { return clearProperty(name); } if (sm instanceof WildFlySecurityManager) { final Context ctx = CTX.get(); if (! ctx.checking) { return clearProperty(name); } ctx.checking = false; try { checkPropertyWritePermission(getCallerClass(2), name); return clearProperty(name); } finally { ctx.checking = true; } } else { checkPropertyWritePermission(getCallerClass(2), name); return doPrivileged(new ClearPropertyAction(name)); } }
/** * Clear a property, doing a faster permission check that skips having to execute a privileged action frame. * * @param name the property name * @return the previous property value, or {@code null} if there was none */ public static String clearPropertyPrivileged(String name) { final SecurityManager sm = getSecurityManager(); if (sm == null) { return clearProperty(name); } if (sm instanceof WildFlySecurityManager) { final Context ctx = CTX.get(); if (! ctx.checking) { return clearProperty(name); } ctx.checking = false; try { checkPropertyWritePermission(getCallerClass(2), name); return clearProperty(name); } finally { ctx.checking = true; } } else { checkPropertyWritePermission(getCallerClass(2), name); return doPrivileged(new ClearPropertyAction(name)); } }
/** * Clear a property, doing a faster permission check that skips having to execute a privileged action frame. * * @param name the property name * @return the previous property value, or {@code null} if there was none */ public static String clearPropertyPrivileged(String name) { final SecurityManager sm = getSecurityManager(); if (sm == null) { return clearProperty(name); } if (sm instanceof WildFlySecurityManager) { final Context ctx = CTX.get(); if (! ctx.checking) { return clearProperty(name); } ctx.checking = false; try { checkPropertyWritePermission(getCallerClass(2), name); return clearProperty(name); } finally { ctx.checking = true; } } else { checkPropertyWritePermission(getCallerClass(2), name); return doPrivileged(new ClearPropertyAction(name)); } }