/** * Get the system environment map, doing a faster permission check that skips having to execute a privileged action * frame. * * @return the system environment map */ public static Map<String, String> getSystemEnvironmentPrivileged() { final SecurityManager sm = System.getSecurityManager(); if (sm == null) { return getenv(); } if (sm instanceof WildFlySecurityManager) { final Context ctx = CTX.get(); if (! ctx.checking) { return getenv(); } ctx.checking = false; try { checkPDPermission(getCallerClass(2), ENVIRONMENT_PERMISSION); return getenv(); } finally { ctx.checking = true; } } else { checkPDPermission(getCallerClass(2), ENVIRONMENT_PERMISSION); return doPrivileged(GetEnvironmentAction.getInstance()); } }
/** * Get the system environment map, doing a faster permission check that skips having to execute a privileged action * frame. * * @return the system environment map */ public static Map<String, String> getSystemEnvironmentPrivileged() { final SecurityManager sm = System.getSecurityManager(); if (sm == null) { return getenv(); } if (sm instanceof WildFlySecurityManager) { final Context ctx = CTX.get(); if (! ctx.checking) { return getenv(); } ctx.checking = false; try { checkPDPermission(getCallerClass(2), ENVIRONMENT_PERMISSION); return getenv(); } finally { ctx.checking = true; } } else { checkPDPermission(getCallerClass(2), ENVIRONMENT_PERMISSION); return doPrivileged(GetEnvironmentAction.getInstance()); } }
/** * Get the system environment map, doing a faster permission check that skips having to execute a privileged action * frame. * * @return the system environment map */ public static Map<String, String> getSystemEnvironmentPrivileged() { final SecurityManager sm = System.getSecurityManager(); if (sm == null) { return getenv(); } if (sm instanceof WildFlySecurityManager) { final Context ctx = CTX.get(); if (! ctx.checking) { return getenv(); } ctx.checking = false; try { checkPDPermission(getCallerClass(2), ENVIRONMENT_PERMISSION); return getenv(); } finally { ctx.checking = true; } } else { checkPDPermission(getCallerClass(2), ENVIRONMENT_PERMISSION); return doPrivileged(GetEnvironmentAction.getInstance()); } }
/** * Get the system environment map, doing a faster permission check that skips having to execute a privileged action * frame. * * @return the system environment map */ public static Map<String, String> getSystemEnvironmentPrivileged() { final SecurityManager sm = System.getSecurityManager(); if (sm == null) { return getenv(); } if (sm instanceof WildFlySecurityManager) { final Context ctx = CTX.get(); if (! ctx.checking) { return getenv(); } ctx.checking = false; try { checkPDPermission(getCallerClass(2), ENVIRONMENT_PERMISSION); return getenv(); } finally { ctx.checking = true; } } else { checkPDPermission(getCallerClass(2), ENVIRONMENT_PERMISSION); return doPrivileged(GetEnvironmentAction.getInstance()); } }
/** * Get the system environment map, doing a faster permission check that skips having to execute a privileged action * frame. * * @return the system environment map */ public static Map<String, String> getSystemEnvironmentPrivileged() { final SecurityManager sm = System.getSecurityManager(); if (sm == null) { return getenv(); } if (sm instanceof WildFlySecurityManager) { final Context ctx = CTX.get(); if (! ctx.checking) { return getenv(); } ctx.checking = false; try { checkPDPermission(getCallerClass(2), ENVIRONMENT_PERMISSION); return getenv(); } finally { ctx.checking = true; } } else { checkPDPermission(getCallerClass(2), ENVIRONMENT_PERMISSION); return doPrivileged(GetEnvironmentAction.getInstance()); } }