You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We encounter two issues when we configured conversionService in Spring config file. Please see attached test case:
Java:
public class TestBean{
private List<String> addresses;
...
}
This doesn't seem to be related to SpEL specifically. It's rather a problem with constructor resolution for that bean of type String: We need to catch ConversionException and ConvertedNotFoundException in BeanWrapper's convertIfNecessary there. Otherwise the String(byte[]) constructor isn't detected as an inappropriate choice and will be processed like it was a matching constructor... leading to an exception that disrupts bean creation completely.
Fixed for 3.0 GA. This will make the next snapshot (508); feel free to give it a try!
Liu, Yinwei David opened SPR-6563 and commented
We encounter two issues when we configured conversionService in Spring config file. Please see attached test case:
Java:
public class TestBean{
private List<String> addresses;
...
}
Config:
<bean id="conversionService" class="org.springframework.context.support.ConversionServiceFactoryBean" />
<bean class="TestBean">
<property name="addresses">
<list>
<value>#{'test-' + strValue + '-end'}</value>
<value>#{'test-' + strValue}</value>
<value>#{'test-' + numValue+ '-end'}</value>
<value>#{'test-' + numValue}</value>
</list>
</property>
</bean>
<bean id="numValue" class="java.lang.Integer" >
<constructor-arg value="111"/>
</bean>
<bean id="strValue" class="java.lang.String" >
<constructor-arg value="222"/>
</bean>
Affects: 3.0 RC3
Referenced from: commits 1c33206
The text was updated successfully, but these errors were encountered: