From: Jean-Christian Kouame Date: Wed, 13 Jul 2016 17:50:03 +0000 (-0400) Subject: tmf.xml: Use LinkedHashMap instead of HashMap X-Git-Url: http://git.efficios.com/?a=commitdiff_plain;ds=sidebyside;h=865cf278dc193fec22cd54d3c0336b3ead868f1c;p=deliverable%2Ftracecompass.git tmf.xml: Use LinkedHashMap instead of HashMap The order in which the FSM are declared in the XML is important. Here, we use a LinkedHashMap instead of a HashMap to conserve this order when iterating through the FSMs. Change-Id: I68837e8f8296741f20d1271d92c43b03ef90c986 Signed-off-by: Jean-Christian Kouame Reviewed-on: https://git.eclipse.org/r/77273 Reviewed-by: Genevieve Bastien Tested-by: Genevieve Bastien Reviewed-by: Hudson CI --- diff --git a/tmf/org.eclipse.tracecompass.tmf.analysis.xml.core/src/org/eclipse/tracecompass/internal/tmf/analysis/xml/core/model/TmfXmlPatternEventHandler.java b/tmf/org.eclipse.tracecompass.tmf.analysis.xml.core/src/org/eclipse/tracecompass/internal/tmf/analysis/xml/core/model/TmfXmlPatternEventHandler.java index 47806b7cfe..238fb4ba63 100644 --- a/tmf/org.eclipse.tracecompass.tmf.analysis.xml.core/src/org/eclipse/tracecompass/internal/tmf/analysis/xml/core/model/TmfXmlPatternEventHandler.java +++ b/tmf/org.eclipse.tracecompass.tmf.analysis.xml.core/src/org/eclipse/tracecompass/internal/tmf/analysis/xml/core/model/TmfXmlPatternEventHandler.java @@ -12,6 +12,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; +import java.util.LinkedHashMap; import java.util.List; import java.util.Map; @@ -41,7 +42,7 @@ public class TmfXmlPatternEventHandler { private final List fInitialFsm; private final Map fTestMap = new HashMap<>(); private final Map fActionMap = new HashMap<>(); - private final Map fFsmMap = new HashMap<>(); + private final Map fFsmMap = new LinkedHashMap<>(); private final List fActiveFsmList = new ArrayList<>(); /**