# HG changeset patch # User Felix Wolfsteller # Date 1318335632 0 # Node ID 014fc183c640ea02db18ef874bdd6acca5599aa6 # Parent 18b0414bde44edfde99e36425b7e6e77585bf37a Fix 'incorrect minuend/subtrahend order' bug in wdiff calculation. flys-client/trunk@2939 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 18b0414bde44 -r 014fc183c640 flys-client/ChangeLog --- a/flys-client/ChangeLog Tue Oct 11 11:59:57 2011 +0000 +++ b/flys-client/ChangeLog Tue Oct 11 12:20:32 2011 +0000 @@ -1,3 +1,11 @@ +2011-10-11 Felix Wolfsteller + + Squashed "swapped minuend and subtrahend"-bug in wdiff calculation. + + * src/main/java/de/intevation/flys/client/client/ui/DatacageTwinPanel.java: + Use LinkedHashSet instead of HashSet to keep the given order. + Removed some debug statements. + 2011-10-11 Felix Wolfsteller Enable reparameterization of WINFO-Artifacts in WDiff-branch. Do not diff -r 18b0414bde44 -r 014fc183c640 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 Oct 11 11:59:57 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/DatacageTwinPanel.java Tue Oct 11 12:20:32 2011 +0000 @@ -1,7 +1,7 @@ package de.intevation.flys.client.client.ui; import java.util.ArrayList; -import java.util.HashSet; +import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.Set; @@ -230,19 +230,18 @@ Config config = Config.getInstance(); ListGridRecord[] records = differencesList.getRecords(); - Set ar = new HashSet(); - Set all = new HashSet(); + // Use LinkedHashSet to keep the order. + Set ar = new LinkedHashSet(); + Set all = new LinkedHashSet(); for (ListGridRecord record : records) { RecommendationPairRecord r = (RecommendationPairRecord) record; // Do not add "old" recommendations. if (!r.isAlreadyLoaded()) { - GWT.log("One not yet loaded."); ar.add(r.getFirst()); ar.add(r.getSecond()); } else { - GWT.log("One already loaded."); all.add(r.getFirst()); all.add(r.getSecond()); } @@ -261,7 +260,8 @@ GWT.log("Failure of cloning with waterlevelfactory!"); } public void onSuccess(Artifact[] artifacts) { - GWT.log("Success in cloning ("+toClone.length+") with watelevelfactory!"); + GWT.log("Successfully cloned " + toClone.length + + " with watelevelfactory."); fireStepForwardEvent(new StepForwardEvent( getData(toClone, artifacts, toUse)));