Skip to content

AbstractFactoryBean should support strongly-typed collection (Java5+ only) [SPR-3049] #7735

@spring-projects-issues

Description

@spring-projects-issues

Alfons Spiegelhauer opened SPR-3049 and commented

The collection classes derived from AbstractFactoryBean must support generic types.
Otherwise the result will be incorrect.

Sample:

public class NamedUrlMap extends HashMap<String, java.net.URL> {
}

application-context:
<util:map id="namedUrlRegistry" map-class="NamedUrlMap ">
<entry key="pechorin" value="classpath:a.xsd"/>
<entry key="raskolnikov" value="classpath:b/c.xsd"/>
</util:map>

After bean creation the type of the value elements is String and not URL


Affects: 2.0.2

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions