From e4af54a2bff0c08f80b53bdd038b96bbe7cd585b Mon Sep 17 00:00:00 2001 From: NoName11234 <47484268+NoName11234@users.noreply.github.com> Date: Sun, 11 Feb 2024 14:38:15 +0100 Subject: [PATCH] added unifyTest --- .../de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -> {