Commit 601e966f authored by Stein Eldar Johnsen's avatar Stein Eldar Johnsen 💬

FakeClock synchronizes the list usage. In case threads are used anyway.

parent 00383464
......@@ -127,12 +127,12 @@
<dependency>
<groupId>net.morimekta.utils</groupId>
<artifactId>io-util</artifactId>
<version>3.1.0</version>
<version>3.2.0</version>
</dependency>
<dependency>
<groupId>net.morimekta.utils</groupId>
<artifactId>diff-util</artifactId>
<version>3.0.1</version>
<version>3.1.0</version>
</dependency>
<dependency>
<groupId>net.morimekta.utils</groupId>
......
......@@ -26,6 +26,7 @@ import java.time.ZoneId;
import java.time.ZoneOffset;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
......@@ -134,7 +135,7 @@ public class FakeClock extends Clock {
this(new AtomicReference<>(now),
new AtomicReference<>(now),
systemUTC.getZone(),
new ArrayList<>(),
Collections.synchronizedList(new ArrayList<>()),
new AtomicBoolean());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment