# HG changeset patch # User Ingo Weinzierl # Date 1315994659 0 # Node ID a3108f0a2fe7e7879e7e7f59b742b1a66c34ea0c # Parent 1e1ef8b750dba40263fa8df98e559e4cb701e7fd Bugfix: merge facets for the Collection's attribute only if the new and old facet's name and owner artifact are equal. flys-artifacts/trunk@2736 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 1e1ef8b750db -r a3108f0a2fe7 flys-artifacts/ChangeLog --- a/flys-artifacts/ChangeLog Wed Sep 14 09:36:28 2011 +0000 +++ b/flys-artifacts/ChangeLog Wed Sep 14 10:04:19 2011 +0000 @@ -1,3 +1,8 @@ +2011-09-14 Ingo Weinzierl + + * src/main/java/de/intevation/flys/collections/AttributeWriter.java: Merge + facets only if their name AND their owner artifact are equal. + 2011-09-14 Felix Wolfsteller Partial Fix flys/issue304 (3) (Baseline). diff -r 1e1ef8b750db -r a3108f0a2fe7 flys-artifacts/src/main/java/de/intevation/flys/collections/AttributeWriter.java --- a/flys-artifacts/src/main/java/de/intevation/flys/collections/AttributeWriter.java Wed Sep 14 09:36:28 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/collections/AttributeWriter.java Wed Sep 14 10:04:19 2011 +0000 @@ -67,8 +67,8 @@ Document doc, Node outs, ElementCreator cr, - Output a, - Output b) + Output a, /* new output */ + Output b) /* old output */ { Element output = cr.create("output"); cr.addAttr(output, "name", a.getName()); @@ -90,8 +90,8 @@ Document doc, ElementCreator cr, Element output, - List a, - List b) + List a, /* new facets */ + List b) /* old facets */ { int num = a.size(); @@ -113,8 +113,8 @@ Document doc, ElementCreator cr, Element output, - ManagedFacet a, - List list) + ManagedFacet a, /* new facets */ + List list) /* old facets */ { String nameA = a.getName() + a.getIndex(); @@ -127,6 +127,12 @@ String nameB = facet.getName() + facet.getIndex(); if (nameA.equals(nameB)) { + ManagedFacet b = (ManagedFacet) facet; + + if (!b.getArtifact().equals(a.getArtifact())) { + continue; + } + Node n = facet.toXML(doc); if (n != null) {