Reset cached ResolvableType on increaseNestingLevel/setContainingClass

Issue: SPR-15160
This commit is contained in:
Juergen Hoeller
2017-01-25 00:30:05 +01:00
parent 5e946c2700
commit 4a57d4512e

View File

@@ -257,6 +257,7 @@ public class DependencyDescriptor extends InjectionPoint implements Serializable
*/
public void increaseNestingLevel() {
this.nestingLevel++;
this.resolvableType = null;
if (this.methodParameter != null) {
this.methodParameter.increaseNestingLevel();
}
@@ -270,6 +271,7 @@ public class DependencyDescriptor extends InjectionPoint implements Serializable
*/
public void setContainingClass(Class<?> containingClass) {
this.containingClass = containingClass;
this.resolvableType = null;
if (this.methodParameter != null) {
GenericTypeResolver.resolveParameterType(this.methodParameter, containingClass);
}