Browse Source

Polishing

pull/30915/head
Juergen Hoeller 3 years 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 {
private static class MethodInvocationInterceptor implements MethodInterceptor, InvocationHandler { private static class MethodInvocationInterceptor implements MethodInterceptor, InvocationHandler {
@Nullable
private Method invokedMethod; private Method invokedMethod;
@Override @Override
@Nullable @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)) { if (ReflectionUtils.isObjectMethod(method)) {
return ReflectionUtils.invokeMethod(method, object, args); return ReflectionUtils.invokeMethod(method, object, args);
} }
@ -629,10 +630,11 @@ public class ResolvableMethod {
@Override @Override
@Nullable @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); return intercept(proxy, method, args, null);
} }
@Nullable
Method getInvokedMethod() { Method getInvokedMethod() {
return this.invokedMethod; return this.invokedMethod;
} }

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

@ -617,11 +617,12 @@ public class ResolvableMethod {
private static class MethodInvocationInterceptor implements MethodInterceptor, InvocationHandler { private static class MethodInvocationInterceptor implements MethodInterceptor, InvocationHandler {
@Nullable
private Method invokedMethod; private Method invokedMethod;
@Override @Override
@Nullable @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)) { if (ReflectionUtils.isObjectMethod(method)) {
return ReflectionUtils.invokeMethod(method, object, args); return ReflectionUtils.invokeMethod(method, object, args);
} }
@ -633,10 +634,11 @@ public class ResolvableMethod {
@Override @Override
@Nullable @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); return intercept(proxy, method, args, null);
} }
@Nullable
Method getInvokedMethod() { Method getInvokedMethod() {
return this.invokedMethod; return this.invokedMethod;
} }

Loading…
Cancel
Save