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:
Sam Brannen
2013-10-15 15:21:47 +02:00
parent e86e182d5d
commit 8fdc7d4e8f
2 changed files with 7 additions and 5 deletions

View File

@@ -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);
}