forked from JavaTX/JavaCompilerCore
Debugabfrage entfernt, die Exception ausgeloest hat
modified: src/main/java/de/dhbwstuttgart/typeinference/unify/UnifyTaskModel.java Methoden synchronized gemacht
This commit is contained in:
parent
d14406e474
commit
c3c0a11572
@ -179,7 +179,7 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|||||||
catch (IOException e) {
|
catch (IOException e) {
|
||||||
System.err.println("log-File nicht vorhanden");
|
System.err.println("log-File nicht vorhanden");
|
||||||
}
|
}
|
||||||
/* Abbruchtest
|
/*Abbruchtest
|
||||||
if (thNo > 10) {
|
if (thNo > 10) {
|
||||||
System.out.println("cancel");
|
System.out.println("cancel");
|
||||||
usedTasks.cancel();
|
usedTasks.cancel();
|
||||||
@ -1110,9 +1110,6 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|||||||
if (!isUndefinedPairSetSet(res) && isUndefinedPairSetSet(result)) {
|
if (!isUndefinedPairSetSet(res) && isUndefinedPairSetSet(result)) {
|
||||||
//wenn korrektes Ergebnis gefunden alle Fehlerfaelle loeschen
|
//wenn korrektes Ergebnis gefunden alle Fehlerfaelle loeschen
|
||||||
result = res;
|
result = res;
|
||||||
if (res.iterator().next() instanceof WildcardType) {
|
|
||||||
System.out.println("");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if ((isUndefinedPairSetSet(res) && isUndefinedPairSetSet(result))
|
if ((isUndefinedPairSetSet(res) && isUndefinedPairSetSet(result))
|
||||||
|
@ -6,11 +6,11 @@ public class UnifyTaskModel {
|
|||||||
|
|
||||||
ArrayList<TypeUnifyTask> usedTasks = new ArrayList<>();
|
ArrayList<TypeUnifyTask> usedTasks = new ArrayList<>();
|
||||||
|
|
||||||
public void add(TypeUnifyTask t) {
|
public synchronized void add(TypeUnifyTask t) {
|
||||||
usedTasks.add(t);
|
usedTasks.add(t);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void cancel() {
|
public synchronized void cancel() {
|
||||||
for(TypeUnifyTask t : usedTasks) {
|
for(TypeUnifyTask t : usedTasks) {
|
||||||
t.myCancel(true);
|
t.myCancel(true);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user