diff --git a/src/main/java/de/dhbwstuttgart/core/JavaTXCompiler.java b/src/main/java/de/dhbwstuttgart/core/JavaTXCompiler.java index 91e6e673..c93db4a4 100644 --- a/src/main/java/de/dhbwstuttgart/core/JavaTXCompiler.java +++ b/src/main/java/de/dhbwstuttgart/core/JavaTXCompiler.java @@ -71,7 +71,7 @@ public class JavaTXCompiler { Boolean resultmodel = false; public final Map sourceFiles = new HashMap<>(); - Boolean log = true; //gibt an ob ein Log-File nach System.getProperty("user.dir")+""/logFiles/"" geschrieben werden soll? + Boolean log = false; //gibt an ob ein Log-File nach System.getProperty("user.dir")+""/logFiles/"" geschrieben werden soll? public volatile UnifyTaskModel usedTasks = new UnifyTaskModel(); private final DirectoryClassLoader classLoader; diff --git a/src/main/java/de/dhbwstuttgart/typeinference/constraints/ConstraintSet.java b/src/main/java/de/dhbwstuttgart/typeinference/constraints/ConstraintSet.java index cd3301c1..f52001b3 100644 --- a/src/main/java/de/dhbwstuttgart/typeinference/constraints/ConstraintSet.java +++ b/src/main/java/de/dhbwstuttgart/typeinference/constraints/ConstraintSet.java @@ -75,11 +75,12 @@ public class ConstraintSet { Constraint newConst = as.stream() .map(o) - .collect(Collectors.toCollection((as.getExtendConstraint() != null) - ? () -> new Constraint (as.isInherited(), - as.getExtendConstraint().stream().map(o).collect(Collectors.toCollection(Constraint::new)), - as.getmethodSignatureConstraint().stream().map(o).collect(Collectors.toCollection(HashSet::new))) - : () -> new Constraint (as.isInherited()) + .collect(Collectors.toCollection(( + () -> new Constraint (as.isInherited(), + (as.getExtendConstraint() != null) + ? as.getExtendConstraint().stream().map(o).collect(Collectors.toCollection(Constraint::new)) + : null, + as.getmethodSignatureConstraint().stream().map(o).collect(Collectors.toCollection(HashSet::new)))) )); //CSA2CSB.put(as, newConst); diff --git a/src/main/java/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java b/src/main/java/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java index 17fbcedd..01834a75 100644 --- a/src/main/java/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java +++ b/src/main/java/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java @@ -668,7 +668,7 @@ public class TypeUnifyTask extends RecursiveTask>> { .filter(x -> x.size()==1) .map(y -> y.stream().findFirst().get()) .collect(Collectors.toCollection(HashSet::new))); - + oneElems.forEach(x -> { if (x instanceof Constraint) methodSignatureConstraint.addAll(((Constraint)x).getmethodSignatureConstraint());}); //optNextSet: Eine mehrelementige Menge, wenn vorhanden Optional>> optNextSet = topLevelSets.stream().filter(x -> x.size()>1).findAny(); diff --git a/src/test/java/TestComplete.java b/src/test/java/TestComplete.java index 43c8883d..d3ca98f4 100644 --- a/src/test/java/TestComplete.java +++ b/src/test/java/TestComplete.java @@ -740,7 +740,7 @@ public class TestComplete { @Test public void testLambdaRunnable() throws Exception { var classFiles = generateClassFiles(new ByteArrayClassLoader(), "LambdaRunnable.jav"); - var clazz = classFiles.get("LambdaRunnable"); + var clazz = classFiles.get("LamRunnable"); var instance = clazz.getDeclaredConstructor().newInstance(); //var m = clazz.getDeclaredMethod("m", Integer.class); //assertEquals(m.invoke(instance, 10), 60);