diff --git a/.gitignore b/.gitignore index 8642ca27..3d41d1db 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ # Mobile Tools for Java (J2ME) .mtj.tmp/ +bin/ # Package Files # *.jar @@ -58,8 +59,3 @@ server/src/test/resources/test_output/ # simulator files, this files are un-tarred before build /simulator/src/main/resources/block-0.0.3/ -/common/bin -/server/bin -/simulator/bin -/stream/bin -/suites/bin diff --git a/simulator/src/main/java/com/hedera/block/simulator/config/data/StreamStatus.java b/simulator/src/main/java/com/hedera/block/simulator/config/data/StreamStatus.java index 3a2a8b61..97d2fe2e 100644 --- a/simulator/src/main/java/com/hedera/block/simulator/config/data/StreamStatus.java +++ b/simulator/src/main/java/com/hedera/block/simulator/config/data/StreamStatus.java @@ -19,6 +19,8 @@ import java.util.ArrayList; import java.util.List; +import static java.util.Objects.requireNonNull; + /** * Represents the status of the stream. * @@ -87,7 +89,8 @@ public Builder consumedBlocks(int consumedBlocks) { * @return the builder instance */ public Builder lastKnownPublisherStatuses(List lastKnownPublisherStatuses) { - this.lastKnownPublisherStatuses = lastKnownPublisherStatuses; + requireNonNull(lastKnownPublisherStatuses); + this.lastKnownPublisherStatuses = new ArrayList<>(lastKnownPublisherStatuses); return this; } @@ -98,7 +101,8 @@ public Builder lastKnownPublisherStatuses(List lastKnownPublisherStatuse * @return the builder instance */ public Builder lastKnownConsumersStatuses(List lastKnownConsumersStatuses) { - this.lastKnownConsumersStatuses = lastKnownConsumersStatuses; + requireNonNull(lastKnownConsumersStatuses); + this.lastKnownConsumersStatuses = new ArrayList<>(lastKnownConsumersStatuses); return this; }