Browse Source

Polishing

pull/30915/head
Juergen Hoeller 1 year ago
parent
commit
6526e79eea
  1. 6
      spring-messaging/src/test/java/org/springframework/messaging/handler/invocation/ResolvableMethod.java
  2. 6
      spring-web/src/testFixtures/java/org/springframework/web/testfixture/method/ResolvableMethod.java

6
spring-messaging/src/test/java/org/springframework/messaging/handler/invocation/ResolvableMethod.java

@ -613,11 +613,12 @@ public class ResolvableMethod { @@ -613,11 +613,12 @@ public class ResolvableMethod {
private static class MethodInvocationInterceptor implements MethodInterceptor, InvocationHandler {
@Nullable
private Method invokedMethod;
@Override
@Nullable
public Object intercept(Object object, Method method, Object[] args, MethodProxy proxy) {
public Object intercept(Object object, Method method, @Nullable Object[] args, @Nullable MethodProxy proxy) {
if (ReflectionUtils.isObjectMethod(method)) {
return ReflectionUtils.invokeMethod(method, object, args);
}
@ -629,10 +630,11 @@ public class ResolvableMethod { @@ -629,10 +630,11 @@ public class ResolvableMethod {
@Override
@Nullable
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
public Object invoke(Object proxy, Method method, @Nullable Object[] args) {
return intercept(proxy, method, args, null);
}
@Nullable
Method getInvokedMethod() {
return this.invokedMethod;
}

6
spring-web/src/testFixtures/java/org/springframework/web/testfixture/method/ResolvableMethod.java

@ -617,11 +617,12 @@ public class ResolvableMethod { @@ -617,11 +617,12 @@ public class ResolvableMethod {
private static class MethodInvocationInterceptor implements MethodInterceptor, InvocationHandler {
@Nullable
private Method invokedMethod;
@Override
@Nullable
public Object intercept(Object object, Method method, Object[] args, MethodProxy proxy) {
public Object intercept(Object object, Method method, @Nullable Object[] args, @Nullable MethodProxy proxy) {
if (ReflectionUtils.isObjectMethod(method)) {
return ReflectionUtils.invokeMethod(method, object, args);
}
@ -633,10 +634,11 @@ public class ResolvableMethod { @@ -633,10 +634,11 @@ public class ResolvableMethod {
@Override
@Nullable
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
public Object invoke(Object proxy, Method method, @Nullable Object[] args) {
return intercept(proxy, method, args, null);
}
@Nullable
Method getInvokedMethod() {
return this.invokedMethod;
}

Loading…
Cancel
Save