public class SecurityExceptionUtils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.Class<?> |
accessDeniedException |
static java.lang.Class<?> |
permissionDeniedExceptionClass |
Constructor and Description |
---|
SecurityExceptionUtils() |
Modifier and Type | Method and Description |
---|---|
static java.lang.RuntimeException |
findSecurityRuntimeException(java.lang.Throwable exception)
Finds a nested RuntimeExceptions of the types
PermissionDeniedException , AccessDeniedException
or returns null. |
static <T extends java.lang.Throwable> |
findThrowableOfTypeIn(java.lang.Class<T> clazz,
java.lang.Throwable exception)
Find in the nested
exception the exception of type clazz
or returns null if no such exception is found. |
public static java.lang.Class<?> permissionDeniedExceptionClass
public static java.lang.Class<?> accessDeniedException
public static java.lang.RuntimeException findSecurityRuntimeException(java.lang.Throwable exception)
PermissionDeniedException
, AccessDeniedException
or returns null.exception
- public static <T extends java.lang.Throwable> T findThrowableOfTypeIn(java.lang.Class<T> clazz, java.lang.Throwable exception)
exception
the exception of type clazz
or returns null
if no such exception is found.clazz
- exception
- the nested Throwable
to search in.Copyright © 2007-2020 EDIT. All Rights Reserved.