Merge conditionals - no need for separate if block
This commit is contained in:
parent
5e5e61fb53
commit
970d794e82
|
@ -552,8 +552,7 @@ public class Functions {
|
||||||
public static RuntimeException rethrow(Throwable pThrowable) {
|
public static RuntimeException rethrow(Throwable pThrowable) {
|
||||||
if (pThrowable == null) {
|
if (pThrowable == null) {
|
||||||
throw new NullPointerException("The Throwable must not be null.");
|
throw new NullPointerException("The Throwable must not be null.");
|
||||||
}
|
} else if (pThrowable instanceof RuntimeException) {
|
||||||
if (pThrowable instanceof RuntimeException) {
|
|
||||||
throw (RuntimeException) pThrowable;
|
throw (RuntimeException) pThrowable;
|
||||||
} else if (pThrowable instanceof Error) {
|
} else if (pThrowable instanceof Error) {
|
||||||
throw (Error) pThrowable;
|
throw (Error) pThrowable;
|
||||||
|
|
Loading…
Reference in New Issue