# HG changeset patch # User Felix Wolfsteller # Date 1317131538 0 # Node ID 6ec804500621e010a98c844019f290583e39428d # Parent 2ce5d7ac9e607a14549eb07fc21d7898a737ced0 Avoid duplicate clones in w-diff branch by using a set instead of a list. flys-client/trunk@2843 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 2ce5d7ac9e60 -r 6ec804500621 flys-client/ChangeLog --- a/flys-client/ChangeLog Tue Sep 27 13:49:34 2011 +0000 +++ b/flys-client/ChangeLog Tue Sep 27 13:52:18 2011 +0000 @@ -1,3 +1,10 @@ +2011-09-27 Felix Wolfsteller + + Use HashSet to avoid duplicate clones in Collections with WDiffs. + + * src/main/java/de/intevation/flys/client/client/ui/DatacageTwinPanel.java: + Use HashSet instead of list to avoid duplicate clones, cosmetics. + 2011-09-27 Felix Wolfsteller Cosmetics, documentation. diff -r 2ce5d7ac9e60 -r 6ec804500621 flys-client/src/main/java/de/intevation/flys/client/client/ui/DatacageTwinPanel.java --- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/DatacageTwinPanel.java Tue Sep 27 13:49:34 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/DatacageTwinPanel.java Tue Sep 27 13:52:18 2011 +0000 @@ -1,8 +1,9 @@ package de.intevation.flys.client.client.ui; import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.List; import java.util.Set; import com.google.gwt.core.client.GWT; @@ -79,7 +80,7 @@ Canvas widget = createWidget(); Canvas submit = getNextButton(); - VLayout layout = new VLayout(); + VLayout layout = new VLayout(); HLayout helperLayout = new HLayout(); label.setHeight(50); helperLayout.addMember(new DatacagePairWidget(this.artifact, @@ -140,7 +141,8 @@ GWT.log("DatacageTwinPanel.onClick"); Config config = Config.getInstance(); ListGridRecord[] records = differencesList.getRecords(); - ArrayList ar = new ArrayList(); + + Set ar = new HashSet(); for (ListGridRecord record : records) { DatacagePairWidget.RecommendationPairRecord r = (DatacagePairWidget.RecommendationPairRecord) record; @@ -164,8 +166,8 @@ fireStepForwardEvent(new StepForwardEvent( getData(rs, artifacts))); - } } - ); + } + } ); }