[MDSAL-446] binding-dom-codec leaks mutable lists Created: 02/May/19  Updated: 01/Oct/19  Resolved: 20/Aug/19

Status: Resolved
Project: mdsal
Component/s: Binding runtime
Affects Version/s: None
Fix Version/s: 5.0.0

Type: Bug Priority: High
Reporter: Robert Varga Assignee: Robert Varga
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Heap dump analysis done as part of MDSAL-442/MDSAL-445 shows that binding-dom-codec is using plain ArrayLists to represent lists.

This is a violation of immutable contract imposed by the fact the data is actually backed by NormalizedNodes (and general MD-SAL architecture requirements, which stress the use of immutable objects), which can be exploited to make a NormalizedNode-backed DataObject report a different set of data than it actually represents.

Audit the code and make sure all lists that we are giving out are immutable.



 Comments   
Comment by Robert Varga [ 27/May/19 ]

Re-targetting to 5.0.0, as I suspect this will break downstreams.

Comment by Robert Varga [ 29/May/19 ]

The knob to opt-out of using mutable lists should be delivered to 4.0.2.

Generated at Wed Feb 07 20:09:50 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.