LinkedCaseInsensitiveMap doesn't override HashMap.clone() [SPR-14509] #19078
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
status: backported
An issue that has been backported to maintenance branches
type: bug
A general bug
Milestone
Richard Browne opened SPR-14509 and commented
LinkedCaseInsensitiveMap derives from HashMap, but it does not override the clone() method. As a result, if you clone() a LinkedCaseInsensitiveMap, then subsequently modify the clone, the original can become corrupt.
Here is a test program to illustrate:
The map1.get("KEY") line should return "FOO". But instead it returns null.
Affects: 3.2.17, 4.2.7, 4.3.1
Issue Links:
Referenced from: commits 6459559, dd65f7a, e8562bb, dadd2c3
Backported to: 4.2.8, 3.2.18
The text was updated successfully, but these errors were encountered: