- 
                Notifications
    
You must be signed in to change notification settings  - Fork 38.8k
 
Description
Juergen Hoeller opened SPR-16791 and commented
SnakeYAML breaks our StrictMapAppenderConstructor by using a different createDefaultMap() signature as of SnakeYAML 1.21. It turns out that beyond this current issue, duplicate key detection is broken for SnakeYAML 1.18+ since the YAML parser has some duplicate key handling built in now, never calling Map.put a second time and therefore bypassing our check on the decorated map.
Let's upgrade to SnakeYAML's new policy as of Spring Framework 5.0.6, using LoaderOptions.setAllowDuplicateKeys(false), deprecating our now pointless StrictMapAppenderConstructor (and removing it altogether for 5.1). Stéphane Nicoll, Andy Wilkinson, this might affect Boot as well (remembering #18082).
Affects: 5.0.5
Issue Links:
- YamlProcessor subclasses can no longer instantiate StrictMapAppenderConstructor [SPR-13504] #18082 YamlProcessor subclasses can no longer instantiate StrictMapAppenderConstructor
 - YamlPropertiesFactoryBean loses entries in the YAML document that have an empty array value [SPR-16769] #21310 YamlPropertiesFactoryBean loses entries in the YAML document that have an empty array value