Skip to content

Commit 02cbee5

Browse files
committed
Polishing
(cherry picked from commit 6526e79)
1 parent 14da1ac commit 02cbee5

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -613,11 +613,12 @@ private List<MethodParameter> applyFilters() {
613613

614614
private static class MethodInvocationInterceptor implements MethodInterceptor, InvocationHandler {
615615

616+
@Nullable
616617
private Method invokedMethod;
617618

618619
@Override
619620
@Nullable
620-
public Object intercept(Object object, Method method, Object[] args, MethodProxy proxy) {
621+
public Object intercept(Object object, Method method, @Nullable Object[] args, @Nullable MethodProxy proxy) {
621622
if (ReflectionUtils.isObjectMethod(method)) {
622623
return ReflectionUtils.invokeMethod(method, object, args);
623624
}
@@ -629,10 +630,11 @@ public Object intercept(Object object, Method method, Object[] args, MethodProxy
629630

630631
@Override
631632
@Nullable
632-
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
633+
public Object invoke(Object proxy, Method method, @Nullable Object[] args) {
633634
return intercept(proxy, method, args, null);
634635
}
635636

637+
@Nullable
636638
Method getInvokedMethod() {
637639
return this.invokedMethod;
638640
}

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -617,11 +617,12 @@ private List<MethodParameter> applyFilters() {
617617

618618
private static class MethodInvocationInterceptor implements MethodInterceptor, InvocationHandler {
619619

620+
@Nullable
620621
private Method invokedMethod;
621622

622623
@Override
623624
@Nullable
624-
public Object intercept(Object object, Method method, Object[] args, MethodProxy proxy) {
625+
public Object intercept(Object object, Method method, @Nullable Object[] args, @Nullable MethodProxy proxy) {
625626
if (ReflectionUtils.isObjectMethod(method)) {
626627
return ReflectionUtils.invokeMethod(method, object, args);
627628
}
@@ -633,10 +634,11 @@ public Object intercept(Object object, Method method, Object[] args, MethodProxy
633634

634635
@Override
635636
@Nullable
636-
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
637+
public Object invoke(Object proxy, Method method, @Nullable Object[] args) {
637638
return intercept(proxy, method, args, null);
638639
}
639640

641+
@Nullable
640642
Method getInvokedMethod() {
641643
return this.invokedMethod;
642644
}

0 commit comments

Comments
 (0)