Refine null-safety in more modules
This commit refines the null-safety in: - spring-jdbc - spring-r2dbc - spring-orm - spring-beans - spring-aop See gh-32475
This commit is contained in:
@@ -136,7 +136,7 @@ public class MethodInvoker {
|
||||
* Set arguments for the method invocation. If this property is not set,
|
||||
* or the Object array is of length 0, a method with no arguments is assumed.
|
||||
*/
|
||||
public void setArguments(Object... arguments) {
|
||||
public void setArguments(@Nullable Object... arguments) {
|
||||
this.arguments = arguments;
|
||||
}
|
||||
|
||||
|
||||
@@ -137,7 +137,7 @@ public abstract class ReflectionUtils {
|
||||
* @param ex the exception to rethrow
|
||||
* @throws RuntimeException the rethrown exception
|
||||
*/
|
||||
public static void rethrowRuntimeException(Throwable ex) {
|
||||
public static void rethrowRuntimeException(@Nullable Throwable ex) {
|
||||
if (ex instanceof RuntimeException runtimeException) {
|
||||
throw runtimeException;
|
||||
}
|
||||
@@ -158,7 +158,7 @@ public abstract class ReflectionUtils {
|
||||
* @param throwable the exception to rethrow
|
||||
* @throws Exception the rethrown exception (in case of a checked exception)
|
||||
*/
|
||||
public static void rethrowException(Throwable throwable) throws Exception {
|
||||
public static void rethrowException(@Nullable Throwable throwable) throws Exception {
|
||||
if (throwable instanceof Exception exception) {
|
||||
throw exception;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user