Skip to content

YamlPropertiesFactoryBean doesn't preserve ordering of YAML documents [SPR-12471] #17077

@spring-projects-issues

Description

@spring-projects-issues

Graeme Rocher opened SPR-12471 and commented

Because of this code:

final Properties result = new Properties();
process(new MatchCallback() {
     @Override
     public void process(Properties properties, Map<String, Object> map) {
          result.putAll(properties);
     }
});

Ordering in YAML documents is broken since a Properties object doesn't retain ordering. This needs to be done with a LInkedHashMap instead and in fact if you look at the map passed into the process method it is a LinkedHashMap.


Affects: 4.1.2

Reference URL: apache/grails-core@d9670e1

Metadata

Metadata

Assignees

Labels

status: invalidAn issue that we don't feel is valid

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions