Closed
Description
Costin Leau opened SPR-5881 and commented
The container could be more explicit about its treatment of primitive vs wrapper objects. Consider the following example:
Foo(Boolean bool)
Foo(boolean bool)
and the configuration
<bean class="Foo">
<constructor-arg>
<value type="boolean">true</value>
</constructor-arg>
</bean>
The Boolean constructor is called instead of the primitive one since the primitives are always wrapped at runtime. Considering the red-herring that primitives are, it would be saner to actually get an exception as the case is ambiguous - both constructor apply and it's unclear who should be used.
The work-around for people that depend on this behaviour is to specify a clear type on the constructor arg:
<constructor-arg value="java.lang.Boolean">....
Affects: 3.0 M3
Issue Links:
- support non-lenient constructor injection [SPR-5816] #10486 support non-lenient constructor injection