Skip to content

ResourcePropertySource cannot load JDK 5 properties xml [SPR-9896] #14529

@spring-projects-issues

Description

@spring-projects-issues

KwonNam Son opened SPR-9896 and commented

ResourcePropertySource cannot load JDK 5 properties XML.

I think that ResourcePropertySource#loadPropertiesForResource method's props.load(is) line has to be like the following:

String filename = resource.getFilename();
if (filename != null && filename.toLowerCase().endsWith(".xml")) {
	props.loadFromXML(is);
} else {
	props.load(is);
}

or just use PropertiesLoaderSupport class for loading properties.


Affects: 3.1.2

Referenced from: commits d5cad15, 3a626f9, a420e84

Backported to: 3.1.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: coreIssues in core modules (aop, beans, core, context, expression)status: backportedAn issue that has been backported to maintenance branchestype: enhancementA general enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions