merging is not actually a merging but combining
GoogleCodeExporter opened this issue · 3 comments
GoogleCodeExporter commented
thx to Jordan's documentation about the merging (see
http://code.google.com/p/snakeyaml/source/detail?r=4d6fd239a2ab8a8ba726e8fb1dd4d
d627e999185&repo=wiki)
I started to wonder why setters are invoked twice.... (maybe even more for some
properties).
Seems like flattenMapping method does not actually merge anything it simply
combines nodes.
As a result MappingNode contains bunch of duplications (in correct order to
pass current tests :)
So setters invoked twice because of those duplication, actually merging just
maps also doing few unnecessary invocations of Map.put(...). But because of the
map nature result is the same as expected.
so.... it seems like a bug. Specific test for flattenMap is coming...
Original issue reported on code.google.com by alexande...@gmail.com
on 15 Jan 2011 at 9:29
GoogleCodeExporter commented
This issue was updated by revision 473ba8f1f4.
More tests for merging.
Original comment by alexande...@gmail.com
on 16 Jan 2011 at 1:59
- Added labels: ****
- Removed labels: ****
GoogleCodeExporter commented
This issue was updated by revision 07e979fae3.
mergind now done "properly" - no duplications inside MappingNode after merge
procedure.
+ "merged" property introduced to MappingNode to prevent unnecessary iterations
over MappingNode's values. "merged" value determined now during composition.
Original comment by alexande...@gmail.com
on 16 Jan 2011 at 1:59
- Added labels: ****
- Removed labels: ****
GoogleCodeExporter commented
Original comment by alexande...@gmail.com
on 19 Jan 2011 at 12:04
- Changed state: Fixed
- Added labels: ****
- Removed labels: ****