public static @ NonNull Throwable unwrap ( final @ NonNull Throwable throwable ) { if ( throwable instanceof InvocationTargetException ) { final /* @Nullable */ Throwable cause = throwable . getCause ( ) ; if ( cause != null ) { return cause ; } } return throwable ; }
Unwraps a throwable .