Skip to content

util:map does not recognize the attribute of value-type [SPR-10994] #15622

@spring-projects-issues

Description

@spring-projects-issues

Ronnin Lee opened SPR-10994 and commented

the util:map bean defined as follows will fail to initialize, an error "Type must not be null" occurs.

<util:map map-class="org.springframework.util.LinkedCaseInsensitiveMap"
          key-type="java.lang.String"
          value-type="org.springframework.web.servlet.ViewResolver">
</util:map>

as to org.springframework.beans.factory.config.MapFactoryBean, I find the fact:

when the attribute of map-class is set, MapFactoryBean will try to resolve the keyType and valueType of the map from ParameterizedType of map-class.

but the attribute of value-type is never used.


Affects: 3.2.4

Issue Links:

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: bugA general bug

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions