Polish type prediction for generic factory methods
- Now avoiding NullPointerExceptions in GenericTypeResolver's resolveReturnTypeForGenericMethod() in case the supplied ClassLoader is null. - AutowireUtils.resolveReturnTypeForFactoryMethod() now properly asserts that the supplied ClassLoader is not null. - Fixed copy-n-paste errors in Javadoc for AutowireUtils.resolveReturnTypeForFactoryMethod(). Issue: SPR-10411
This commit is contained in:
@@ -164,7 +164,7 @@ public abstract class GenericTypeResolver {
|
||||
if (arg instanceof Class) {
|
||||
return (Class<?>) arg;
|
||||
}
|
||||
else if (arg instanceof String) {
|
||||
else if (arg instanceof String && classLoader != null) {
|
||||
try {
|
||||
return classLoader.loadClass((String) arg);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user