Fixed type resolution for uninitialized factory-method declaration
Issue: SPR-11112
This commit is contained in:
@@ -54,11 +54,11 @@ public class FactoryMethods {
|
||||
return new FactoryMethods(tb, name, num);
|
||||
}
|
||||
|
||||
static FactoryMethods newInstance(TestBean tb, int num, Integer something) {
|
||||
static ExtendedFactoryMethods newInstance(TestBean tb, int num, Integer something) {
|
||||
if (something != null) {
|
||||
throw new IllegalStateException("Should never be called with non-null value");
|
||||
}
|
||||
return new FactoryMethods(tb, null, num);
|
||||
return new ExtendedFactoryMethods(tb, null, num);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@@ -119,4 +119,12 @@ public class FactoryMethods {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
public static class ExtendedFactoryMethods extends FactoryMethods {
|
||||
|
||||
ExtendedFactoryMethods(TestBean tb, String name, int num) {
|
||||
super(tb, name, num);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user