Closed
Description
Gary Russell opened SPR-11479 and commented
Consider
- source : ArrayList
- sourceType : java.util.ArrayList<?>
- targetType : java.util.Collection<?>
Line #63...
...determines that copyRequired == false
.
However, line 70 then proceeds to copy the elements from the source to the target, which is eventually discarded, when line #84 simply returns the source.
It looks to me like it should have
if (copyRequired) {}
``` around the for loop. The else clause needs to run, in case `copyRequired` gets changed to true.
Affects: 3.2.8, 4.0.2
Issue Links:
- INT-3306 Aggregator memory usage raises serious performance issue
Referenced from: commits bea94d5, d317b63
Backported to: 3.2.9