diff --git a/moskito-core/src/main/java/net/anotheria/moskito/core/journey/Journey.java b/moskito-core/src/main/java/net/anotheria/moskito/core/journey/Journey.java index a8153a245..18abfcbb9 100644 --- a/moskito-core/src/main/java/net/anotheria/moskito/core/journey/Journey.java +++ b/moskito-core/src/main/java/net/anotheria/moskito/core/journey/Journey.java @@ -3,6 +3,7 @@ import net.anotheria.moskito.core.calltrace.CurrentlyTracedCall; import java.util.ArrayList; +import java.util.Collections; import java.util.List; /** @@ -43,7 +44,7 @@ public Journey(String aName){ name = aName; createdTimestamp = System.currentTimeMillis(); active = true; - tracedCalls = new ArrayList<>(); + tracedCalls = Collections.synchronizedList(new ArrayList<>()); } /** @@ -94,23 +95,27 @@ public String toString(){ } public void removeStepByName(String stepName){ - for (int i=0; i