diff --git a/src/main/java/de/dhbwstuttgart/bytecode/BytecodeGenMethod.java b/src/main/java/de/dhbwstuttgart/bytecode/BytecodeGenMethod.java index 5cbcfca9..8e6952e6 100644 --- a/src/main/java/de/dhbwstuttgart/bytecode/BytecodeGenMethod.java +++ b/src/main/java/de/dhbwstuttgart/bytecode/BytecodeGenMethod.java @@ -592,7 +592,6 @@ public class BytecodeGenMethod implements StatementVisitor { this.lamCounter++; String typeErasure = createDescriptorWithTypeErasure(lambdaExpression); - //ToDo Etienne: Double Check RefTypeOrTPHOrWildcardOrGeneric returnType = resolver.resolve(lambdaExpression.getReturnType()); List argumentTypes = lambdaExpression .params @@ -828,7 +827,6 @@ public class BytecodeGenMethod implements StatementVisitor { } else if(!helper.isInCurrPkg(clazz)){ if(clazz.contains(CONSTANTS.$$)) { mDesc = helper.getDescriptorOfApplyMethod(methCallType); - //ToDo Etienne: Double Check RefTypeOrTPHOrWildcardOrGeneric returnType = resolver.resolve(methodCall.getType()); List argumentTypes = methodCall .arglist diff --git a/src/main/java/de/dhbwstuttgart/bytecode/descriptor/DescriptorToString.java b/src/main/java/de/dhbwstuttgart/bytecode/descriptor/DescriptorToString.java index c272c12f..90064863 100644 --- a/src/main/java/de/dhbwstuttgart/bytecode/descriptor/DescriptorToString.java +++ b/src/main/java/de/dhbwstuttgart/bytecode/descriptor/DescriptorToString.java @@ -153,7 +153,6 @@ public class DescriptorToString implements DescriptorVisitor, CONSTANTS { return desc; } - //ToDo Etienne: ändern @Override public String visit(Lambda lambdaExpression) { String desc = "("; diff --git a/src/test/java/bytecode/OLFun2Test.java b/src/test/java/bytecode/OLFun2Test.java index c0f9abf3..a38f405b 100644 --- a/src/test/java/bytecode/OLFun2Test.java +++ b/src/test/java/bytecode/OLFun2Test.java @@ -47,24 +47,28 @@ public class OLFun2Test { @Test public void mExistsWithIntegerInteger() throws Exception{ Method m = classToTest.getDeclaredMethod("m", classFun1IntInt); + assertEquals(Integer.class, m.getReturnType()); assertNotNull(m); } @Test public void mExistsWithIntegerDouble() throws Exception{ Method m = classToTest.getDeclaredMethod("m", classFun1IntDouble); + assertEquals(Double.class, m.getReturnType()); assertNotNull(m); } @Test public void mExistsWithDoubleInteger() throws Exception{ Method m = classToTest.getDeclaredMethod("m", classFun1DoubleInt); + assertEquals(Integer.class, m.getReturnType()); assertNotNull(m); } @Test public void mExistsWithDoubleDouble() throws Exception{ Method m = classToTest.getDeclaredMethod("m", classFun1DoubleDouble); + assertEquals(Double.class, m.getReturnType()); assertNotNull(m); } diff --git a/src/test/resources/bytecode/javFiles/OLFun2.jav b/src/test/resources/bytecode/javFiles/OLFun2.jav index affde26a..c4eab944 100644 --- a/src/test/resources/bytecode/javFiles/OLFun2.jav +++ b/src/test/resources/bytecode/javFiles/OLFun2.jav @@ -9,5 +9,6 @@ public class OLFun2 { m(f){ var x = 1; var y = f.apply(x + x) + 1; + return y; } } \ No newline at end of file