diff --git a/src/main/java/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java b/src/main/java/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java index 2778fd191..d2c1fc6b2 100644 --- a/src/main/java/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java +++ b/src/main/java/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java @@ -56,6 +56,7 @@ import java.io.OutputStreamWriter; import java.io.Writer; import com.google.common.collect.Ordering; +import org.apache.commons.io.output.NullWriter; /** @@ -161,7 +162,10 @@ public class TypeUnifyTask extends RecursiveTask>> { this.statistics = statistics; } public TypeUnifyTask(Set eq, List>> oderConstraints, IFiniteClosure fc, boolean parallel, Writer logFile, Boolean log, int rekTiefe, UnifyResultModel urm, UnifyTaskModel usedTasks) { - synchronized (this) { + synchronized (this) { + if(statistics==null){ + statistics = new NullWriter(); + } this.eq = eq; //this.oderConstraints = oderConstraints.stream().map(x -> x.stream().map(y -> new HashSet<>(y)).collect(Collectors.toSet(HashSet::new))).collect(Collectors.toList(ArrayList::new)); this.oderConstraintsField = oderConstraints; /*.stream().map(x -> {