Polishing

This commit is contained in:
Juergen Hoeller
2023-08-03 18:10:13 +02:00
parent cba2b6eaf4
commit 4b6fabbd2f
6 changed files with 22 additions and 26 deletions

View File

@@ -166,7 +166,8 @@ class TypeConverterDelegate {
}
else if (requiredType.isArray()) {
// Array required -> apply appropriate conversion of elements.
if (convertedValue instanceof String text && Enum.class.isAssignableFrom(requiredType.getComponentType())) {
if (convertedValue instanceof String text &&
Enum.class.isAssignableFrom(requiredType.getComponentType())) {
convertedValue = StringUtils.commaDelimitedListToStringArray(text);
}
return (T) convertToTypedArray(convertedValue, propertyName, requiredType.getComponentType());

View File

@@ -583,7 +583,6 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp
Class<?>[] typesToMatch = (FactoryBean.class == classToMatch ?
new Class<?>[] {classToMatch} : new Class<?>[] {FactoryBean.class, classToMatch});
// Attempt to predict the bean type
Class<?> predictedType = null;