summaryrefslogtreecommitdiff
path: root/src/cz/crcs/ectester/common/test/CompoundTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/cz/crcs/ectester/common/test/CompoundTest.java')
-rw-r--r--src/cz/crcs/ectester/common/test/CompoundTest.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cz/crcs/ectester/common/test/CompoundTest.java b/src/cz/crcs/ectester/common/test/CompoundTest.java
index 3b0b542..10ecf9c 100644
--- a/src/cz/crcs/ectester/common/test/CompoundTest.java
+++ b/src/cz/crcs/ectester/common/test/CompoundTest.java
@@ -1,5 +1,7 @@
package cz.crcs.ectester.common.test;
+import java.util.Arrays;
+import java.util.Objects;
import java.util.function.Function;
/**
@@ -14,7 +16,7 @@ public class CompoundTest extends Test {
private CompoundTest(Function<Test[], Result> callback, Test... tests) {
this.callback = callback;
- this.tests = tests;
+ this.tests = Arrays.stream(tests).filter(Objects::nonNull).toArray(Test[]::new);
}
private CompoundTest(Function<Test[], Result> callback, String descripiton, Test... tests) {