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 @@ ...@@ -127,12 +127,12 @@
<dependency> <dependency>
<groupId>net.morimekta.utils</groupId> <groupId>net.morimekta.utils</groupId>
<artifactId>io-util</artifactId> <artifactId>io-util</artifactId>
<version>3.1.0</version> <version>3.2.0</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>net.morimekta.utils</groupId> <groupId>net.morimekta.utils</groupId>
<artifactId>diff-util</artifactId> <artifactId>diff-util</artifactId>
<version>3.0.1</version> <version>3.1.0</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>net.morimekta.utils</groupId> <groupId>net.morimekta.utils</groupId>
......
...@@ -26,6 +26,7 @@ import java.time.ZoneId; ...@@ -26,6 +26,7 @@ import java.time.ZoneId;
import java.time.ZoneOffset; import java.time.ZoneOffset;
import java.time.temporal.ChronoUnit; import java.time.temporal.ChronoUnit;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicBoolean;
...@@ -134,7 +135,7 @@ public class FakeClock extends Clock { ...@@ -134,7 +135,7 @@ public class FakeClock extends Clock {
this(new AtomicReference<>(now), this(new AtomicReference<>(now),
new AtomicReference<>(now), new AtomicReference<>(now),
systemUTC.getZone(), systemUTC.getZone(),
new ArrayList<>(), Collections.synchronizedList(new ArrayList<>()),
new AtomicBoolean()); 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