Skip to content

Commit cdba733

Browse files
committed
No logicial change: collapse ReflectiveOperationExceptions into a single block
1 parent 35c0035 commit cdba733

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

java/client/src/org/openqa/selenium/remote/ErrorHandler.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
import org.openqa.selenium.WebDriverException;
3232

3333
import java.lang.reflect.Constructor;
34-
import java.lang.reflect.InvocationTargetException;
3534
import java.math.BigDecimal;
3635
import java.math.RoundingMode;
3736
import java.util.List;
@@ -215,13 +214,7 @@ private <T extends Throwable> T createThrowable(
215214
try {
216215
Constructor<T> constructor = clazz.getConstructor(parameterTypes);
217216
return constructor.newInstance(parameters);
218-
} catch (NoSuchMethodException e) {
219-
// Do nothing - fall through.
220-
} catch (InvocationTargetException e) {
221-
// Do nothing - fall through.
222-
} catch (InstantiationException e) {
223-
// Do nothing - fall through.
224-
} catch (IllegalAccessException e) {
217+
} catch (ReflectiveOperationException e) {
225218
// Do nothing - fall through.
226219
} catch (OutOfMemoryError error) {
227220
// It can happen...

0 commit comments

Comments
 (0)