From e07df035ea808e13dfded936959f8737c70c551a Mon Sep 17 00:00:00 2001 From: michael Date: Tue, 3 Mar 2020 10:26:00 +0100 Subject: [PATCH] Check for null list. Crash fix. --- pom.xml | 4 ++-- .../de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 4902ed65..6e787d28 100644 --- a/pom.xml +++ b/pom.xml @@ -63,7 +63,7 @@ http://maven.apache.org/maven-v4_0_0.xsd"> true - + org.antlr antlr4-maven-plugin diff --git a/src/main/java/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java b/src/main/java/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java index 8e940d70..2d6dc8fa 100644 --- a/src/main/java/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java +++ b/src/main/java/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java @@ -1224,7 +1224,7 @@ public class TypeUnifyTask extends RecursiveTask>> { if (!isUndefinedPairSetSet(par_res) && isUndefinedPairSetSet(result)) { //wenn korrektes Ergebnis gefunden alle Fehlerfaelle loeschen result = par_res; - if (par_res.iterator().next() instanceof WildcardType) { + if (!par_res.isEmpty() && par_res.iterator().next() instanceof WildcardType) { System.out.println(""); } }