File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
spring-core/src/main/java/org/springframework/core Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -372,6 +372,8 @@ static class MethodInvokeTypeProvider implements TypeProvider {
372
372
373
373
private final String methodName ;
374
374
375
+ private final Class <?> declaringClass ;
376
+
375
377
private final int index ;
376
378
377
379
private transient Method method ;
@@ -381,6 +383,7 @@ static class MethodInvokeTypeProvider implements TypeProvider {
381
383
public MethodInvokeTypeProvider (TypeProvider provider , Method method , int index ) {
382
384
this .provider = provider ;
383
385
this .methodName = method .getName ();
386
+ this .declaringClass = method .getDeclaringClass ();
384
387
this .index = index ;
385
388
this .method = method ;
386
389
}
@@ -404,7 +407,7 @@ public Object getSource() {
404
407
405
408
private void readObject (ObjectInputStream inputStream ) throws IOException , ClassNotFoundException {
406
409
inputStream .defaultReadObject ();
407
- this .method = ReflectionUtils .findMethod (this .provider . getType (). getClass () , this .methodName );
410
+ this .method = ReflectionUtils .findMethod (this .declaringClass , this .methodName );
408
411
Assert .state (Type .class == this .method .getReturnType () || Type [].class == this .method .getReturnType ());
409
412
}
410
413
}
You can’t perform that action at this time.
0 commit comments