diff options
Diffstat (limited to 'dcevm/src')
4 files changed, 18 insertions, 7 deletions
diff --git a/dcevm/src/test/java8/com/github/dcevm/test/lambdas/LambdaA.java b/dcevm/src/test/java8/com/github/dcevm/test/lambdas/LambdaA.java index 670cf8b7..758a796a 100644 --- a/dcevm/src/test/java8/com/github/dcevm/test/lambdas/LambdaA.java +++ b/dcevm/src/test/java8/com/github/dcevm/test/lambdas/LambdaA.java @@ -1,13 +1,14 @@ package com.github.dcevm.test.lambdas; +import java.io.Serializable; import java.util.concurrent.Callable; -public class LambdaA { - public Callable<Integer> createLambda() { +public class LambdaA implements Serializable { + public SerializableCallable<Integer> createLambda() { return () -> 10; } - public Callable<Integer> createLambda2() { + public SerializableCallable<Integer> createLambda2() { return () -> 20; } } diff --git a/dcevm/src/test/java8/com/github/dcevm/test/lambdas/LambdaA___1.java b/dcevm/src/test/java8/com/github/dcevm/test/lambdas/LambdaA___1.java index 37697150..03f5d018 100644 --- a/dcevm/src/test/java8/com/github/dcevm/test/lambdas/LambdaA___1.java +++ b/dcevm/src/test/java8/com/github/dcevm/test/lambdas/LambdaA___1.java @@ -1,14 +1,15 @@ package com.github.dcevm.test.lambdas; +import java.io.Serializable; import java.util.concurrent.Callable; -public class LambdaA___1 { +public class LambdaA___1 implements Serializable { - public Callable<Integer> createLambda() { + public SerializableCallable<Integer> createLambda() { return () -> 30; } - public Callable<Integer> createLambda2() { + public SerializableCallable<Integer> createLambda2() { return () -> 40; } } diff --git a/dcevm/src/test/java8/com/github/dcevm/test/lambdas/LambdaTest.java b/dcevm/src/test/java8/com/github/dcevm/test/lambdas/LambdaTest.java index 685f4215..efacdbbc 100644 --- a/dcevm/src/test/java8/com/github/dcevm/test/lambdas/LambdaTest.java +++ b/dcevm/src/test/java8/com/github/dcevm/test/lambdas/LambdaTest.java @@ -53,7 +53,6 @@ public class LambdaTest { } @Test - @Ignore public void testMethodLambda() throws Exception { LambdaA a = new LambdaA(); Callable<Integer> lambda = a.createLambda(); diff --git a/dcevm/src/test/java8/com/github/dcevm/test/lambdas/SerializableCallable.java b/dcevm/src/test/java8/com/github/dcevm/test/lambdas/SerializableCallable.java new file mode 100644 index 00000000..6e22c626 --- /dev/null +++ b/dcevm/src/test/java8/com/github/dcevm/test/lambdas/SerializableCallable.java @@ -0,0 +1,10 @@ +package com.github.dcevm.test.lambdas; + +import java.io.Serializable; +import java.util.concurrent.Callable; + +/** + * Created by idubrov on 5/2/14. + */ +public interface SerializableCallable<T> extends Callable<T>, Serializable { +} |