From 448c489a4969afbe42590357384cb2acf33d1ddd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Pl=C3=BCmicke?= Date: Sat, 27 Apr 2019 15:44:21 +0200 Subject: [PATCH] modified: src/main/java/de/dhbwstuttgart/typeinference/result/ResultSet.java modified: src/test/resources/bytecode/javFiles/Lambda.jav modified: src/test/resources/bytecode/javFiles/MatrixOP.jav modified: src/test/resources/bytecode/javFiles/OL.jav --- .../de/dhbwstuttgart/typeinference/result/ResultSet.java | 5 ++--- src/test/resources/bytecode/javFiles/Lambda.jav | 1 + src/test/resources/bytecode/javFiles/MatrixOP.jav | 2 +- src/test/resources/bytecode/javFiles/OL.jav | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/de/dhbwstuttgart/typeinference/result/ResultSet.java b/src/main/java/de/dhbwstuttgart/typeinference/result/ResultSet.java index f095c364..a030027b 100644 --- a/src/main/java/de/dhbwstuttgart/typeinference/result/ResultSet.java +++ b/src/main/java/de/dhbwstuttgart/typeinference/result/ResultSet.java @@ -22,9 +22,8 @@ public class ResultSet { public ResultSet(Set set){ this.results = set; - this.genIns = results.stream().filter(a -> a instanceof PairTPHsmallerTPH) - //.map(b -> new GenericInsertPair( (TypePlaceholder)(b.getLeft()), (TypePlaceholder)(b.getRight()))) - .collect(Collectors.toCollection(HashSet::new)); + this.genIns = new HashSet<>(); + results.forEach(x -> { if (x instanceof PairTPHsmallerTPH) { this.genIns.add(x);}} ); } public boolean contains(ResultPair toCheck) { diff --git a/src/test/resources/bytecode/javFiles/Lambda.jav b/src/test/resources/bytecode/javFiles/Lambda.jav index b0321fc2..ba466b18 100644 --- a/src/test/resources/bytecode/javFiles/Lambda.jav +++ b/src/test/resources/bytecode/javFiles/Lambda.jav @@ -7,4 +7,5 @@ public class Lambda { return x; }; return lam1; + } } diff --git a/src/test/resources/bytecode/javFiles/MatrixOP.jav b/src/test/resources/bytecode/javFiles/MatrixOP.jav index 21d37347..52c3fe96 100644 --- a/src/test/resources/bytecode/javFiles/MatrixOP.jav +++ b/src/test/resources/bytecode/javFiles/MatrixOP.jav @@ -1,6 +1,6 @@ import java.util.Vector; import java.lang.Integer; -//import java.lang.Byte; +import java.lang.Byte; import java.lang.Boolean; public class MatrixOP extends Vector> { diff --git a/src/test/resources/bytecode/javFiles/OL.jav b/src/test/resources/bytecode/javFiles/OL.jav index 6e921ddd..83361d3c 100644 --- a/src/test/resources/bytecode/javFiles/OL.jav +++ b/src/test/resources/bytecode/javFiles/OL.jav @@ -6,13 +6,13 @@ import java.lang.Double; public class OL { - java.lang.Integer m(java.lang.Integer x) { return x + x; } + m(x) { return x + x; } } public class OLMain { - java.lang.Integer main(java.lang.Integer x) { + main(x) { var ol; ol = new OL(); return ol.m(x);