primitive vs wrapper objects abiguity inside the container [SPR-5881] #10550
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
Milestone
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:
and the configuration
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:
Affects: 3.0 M3
Issue Links:
The text was updated successfully, but these errors were encountered: