1
1
/*
2
- * Copyright 2002-2015 the original author or authors.
2
+ * Copyright 2002-2016 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -265,7 +265,8 @@ public static Object invokeJdbcMethod(Method method, Object target, Object... ar
265
265
* checked exception is expected to be thrown by the target method.
266
266
* <p>Throws the underlying RuntimeException or Error in case of an
267
267
* InvocationTargetException with such a root cause. Throws an
268
- * IllegalStateException with an appropriate message else.
268
+ * IllegalStateException with an appropriate message or
269
+ * UndeclaredThrowableException otherwise.
269
270
* @param ex the reflection exception to handle
270
271
*/
271
272
public static void handleReflectionException (Exception ex ) {
@@ -288,7 +289,7 @@ public static void handleReflectionException(Exception ex) {
288
289
* Handle the given invocation target exception. Should only be called if no
289
290
* checked exception is expected to be thrown by the target method.
290
291
* <p>Throws the underlying RuntimeException or Error in case of such a root
291
- * cause. Throws an IllegalStateException else .
292
+ * cause. Throws an UndeclaredThrowableException otherwise .
292
293
* @param ex the invocation target exception to handle
293
294
*/
294
295
public static void handleInvocationTargetException (InvocationTargetException ex ) {
@@ -300,8 +301,9 @@ public static void handleInvocationTargetException(InvocationTargetException ex)
300
301
* <em>target exception</em> of an {@link InvocationTargetException}.
301
302
* Should only be called if no checked exception is expected to be thrown
302
303
* by the target method.
303
- * <p>Rethrows the underlying exception cast to an {@link RuntimeException} or
304
- * {@link Error} if appropriate; otherwise, throws an {@link IllegalStateException}.
304
+ * <p>Rethrows the underlying exception cast to a {@link RuntimeException} or
305
+ * {@link Error} if appropriate; otherwise, throws an
306
+ * {@link UndeclaredThrowableException}.
305
307
* @param ex the exception to rethrow
306
308
* @throws RuntimeException the rethrown exception
307
309
*/
@@ -321,7 +323,8 @@ public static void rethrowRuntimeException(Throwable ex) {
321
323
* Should only be called if no checked exception is expected to be thrown
322
324
* by the target method.
323
325
* <p>Rethrows the underlying exception cast to an {@link Exception} or
324
- * {@link Error} if appropriate; otherwise, throws an {@link IllegalStateException}.
326
+ * {@link Error} if appropriate; otherwise, throws an
327
+ * {@link UndeclaredThrowableException}.
325
328
* @param ex the exception to rethrow
326
329
* @throws Exception the rethrown exception (in case of a checked exception)
327
330
*/
@@ -804,7 +807,7 @@ public interface FieldFilter {
804
807
/**
805
808
* Pre-built FieldFilter that matches all non-static, non-final fields.
806
809
*/
807
- public static FieldFilter COPYABLE_FIELDS = new FieldFilter () {
810
+ public static final FieldFilter COPYABLE_FIELDS = new FieldFilter () {
808
811
809
812
@ Override
810
813
public boolean matches (Field field ) {
@@ -816,7 +819,7 @@ public boolean matches(Field field) {
816
819
/**
817
820
* Pre-built MethodFilter that matches all non-bridge methods.
818
821
*/
819
- public static MethodFilter NON_BRIDGED_METHODS = new MethodFilter () {
822
+ public static final MethodFilter NON_BRIDGED_METHODS = new MethodFilter () {
820
823
821
824
@ Override
822
825
public boolean matches (Method method ) {
@@ -829,7 +832,7 @@ public boolean matches(Method method) {
829
832
* Pre-built MethodFilter that matches all non-bridge methods
830
833
* which are not declared on {@code java.lang.Object}.
831
834
*/
832
- public static MethodFilter USER_DECLARED_METHODS = new MethodFilter () {
835
+ public static final MethodFilter USER_DECLARED_METHODS = new MethodFilter () {
833
836
834
837
@ Override
835
838
public boolean matches (Method method ) {
0 commit comments