Fixed type resolution for uninitialized factory-method declaration
Issue: SPR-11112
(cherry picked from commit 5dcd287)
This commit is contained in:
@@ -55,11 +55,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")
|
||||
@@ -120,4 +120,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