Merge conditionals - no need for separate if block

This commit is contained in:
Sebb 2019-09-05 17:12:09 +01:00
parent 5e5e61fb53
commit 970d794e82
1 changed files with 1 additions and 2 deletions

View File

@ -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;