From c3c0a11572b7d9798adc6d153f882bc53d3e6649 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Pl=C3=BCmicke?= Date: Sun, 12 May 2019 19:15:26 +0200 Subject: [PATCH] Debugabfrage entfernt, die Exception ausgeloest hat modified: src/main/java/de/dhbwstuttgart/typeinference/unify/UnifyTaskModel.java Methoden synchronized gemacht --- .../de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java | 5 +---- .../de/dhbwstuttgart/typeinference/unify/UnifyTaskModel.java | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/main/java/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java b/src/main/java/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java index be9471c00..975ff37c8 100644 --- a/src/main/java/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java +++ b/src/main/java/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java @@ -179,7 +179,7 @@ public class TypeUnifyTask extends RecursiveTask>> { catch (IOException e) { System.err.println("log-File nicht vorhanden"); } - /* Abbruchtest + /*Abbruchtest if (thNo > 10) { System.out.println("cancel"); usedTasks.cancel(); @@ -1110,9 +1110,6 @@ public class TypeUnifyTask extends RecursiveTask>> { if (!isUndefinedPairSetSet(res) && isUndefinedPairSetSet(result)) { //wenn korrektes Ergebnis gefunden alle Fehlerfaelle loeschen result = res; - if (res.iterator().next() instanceof WildcardType) { - System.out.println(""); - } } else { if ((isUndefinedPairSetSet(res) && isUndefinedPairSetSet(result)) diff --git a/src/main/java/de/dhbwstuttgart/typeinference/unify/UnifyTaskModel.java b/src/main/java/de/dhbwstuttgart/typeinference/unify/UnifyTaskModel.java index 5b70eff8f..e60054f0e 100644 --- a/src/main/java/de/dhbwstuttgart/typeinference/unify/UnifyTaskModel.java +++ b/src/main/java/de/dhbwstuttgart/typeinference/unify/UnifyTaskModel.java @@ -6,11 +6,11 @@ public class UnifyTaskModel { ArrayList usedTasks = new ArrayList<>(); - public void add(TypeUnifyTask t) { + public synchronized void add(TypeUnifyTask t) { usedTasks.add(t); } - public void cancel() { + public synchronized void cancel() { for(TypeUnifyTask t : usedTasks) { t.myCancel(true); }