Skip to content

Commit

Permalink
Replace HashMap with LinkedHashMap => deterministic iteration order
Browse files Browse the repository at this point in the history
  • Loading branch information
jsyrjala committed Aug 13, 2014
1 parent 30a46e8 commit 811e9b0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.nitorcreations.nflow.engine.workflow.instance;

import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

Expand Down Expand Up @@ -54,8 +54,8 @@ public static class Builder {
String stateText;
DateTime nextActivation;
boolean processing;
final HashMap<String, String> originalStateVariables = new HashMap<>();
final HashMap<String, String> stateVariables = new HashMap<>();
final Map<String, String> originalStateVariables = new LinkedHashMap<>();
final Map<String, String> stateVariables = new LinkedHashMap<>();
List<WorkflowInstanceAction> actions;
int retries;
DateTime created;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import java.nio.file.Paths;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.Map;
import java.util.Set;
Expand Down Expand Up @@ -60,7 +60,7 @@ public StartNflow registerSpringContext(Class<?> ... springContextClass) {
}

public JettyServerContainer startJetty(int port, String env, String profiles) throws Exception {
return startJetty(port, env, profiles, new HashMap<String, Object>());
return startJetty(port, env, profiles, new LinkedHashMap<String, Object>());
}

public JettyServerContainer startJetty(int port, String env, String profiles, Map<String, Object> properties) throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import static org.apache.commons.lang3.StringUtils.right;
import static org.junit.Assert.assertTrue;

import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.concurrent.atomic.AtomicReference;

Expand Down Expand Up @@ -35,7 +35,7 @@ public static class Builder {
int port = 0;
String env = "local";
String profiles = "";
final Map<String, Object> props = new HashMap<>();
final Map<String, Object> props = new LinkedHashMap<>();
{
props.put("nflow.db.h2.tcp.port", "");
props.put("nflow.db.h2.console.port", "");
Expand Down

0 comments on commit 811e9b0

Please sign in to comment.