Explicit support of String[] value resolution

This commit adds an explicit support for String array for value
resolution. <util:properties> switches the 'locations' property to a
String array in 662d8aa and this broke expression evaluation.

Issue: SPR-12391
This commit is contained in:
Stephane Nicoll
2014-10-31 07:55:27 +01:00
parent 2f03945410
commit 8e5c77dc11
2 changed files with 29 additions and 0 deletions

View File

@@ -200,6 +200,14 @@ class BeanDefinitionValueResolver {
"Error converting typed String value for " + argName, ex);
}
}
else if (value instanceof String[]) {
String[] values = (String[]) value;
Object[] resolvedValues = new Object[values.length];
for (int i = 0; i < values.length; i++) {
resolvedValues[i] = evaluate(values[i]);
}
return resolvedValues;
}
else {
return evaluate(value);
}