From 334167bd22cc21c59bd6f4a49dec7057a615206b Mon Sep 17 00:00:00 2001 From: Roel Spilker Date: Fri, 19 Mar 2021 03:35:59 +0100 Subject: [jdk16] Suddenly, Stream has a default method toList :-) --- test/transform/resource/after-ecj/ExtensionMethodFunctional.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/transform/resource/after-ecj') diff --git a/test/transform/resource/after-ecj/ExtensionMethodFunctional.java b/test/transform/resource/after-ecj/ExtensionMethodFunctional.java index e847c1f0..0971a9be 100644 --- a/test/transform/resource/after-ecj/ExtensionMethodFunctional.java +++ b/test/transform/resource/after-ecj/ExtensionMethodFunctional.java @@ -21,7 +21,7 @@ import lombok.experimental.ExtensionMethod; consumer[i].accept(o); } } - public static List toList(Stream stream) { + public static List toList1(Stream stream) { return (List) stream.collect(Collectors.toList()); } public static List toList2(Stream stream) { @@ -36,7 +36,7 @@ import lombok.experimental.ExtensionMethod; test = ExtensionMethodFunctional.Extensions.map(test, ( s) -> ExtensionMethodFunctional.Extensions.reverse(s)); ExtensionMethodFunctional.Extensions.consume(test, ( s) -> System.out.println(("1: " + s)), ( s) -> System.out.println(("2: " + s))); ExtensionMethodFunctional.Extensions.consume(test, System.out::println, System.out::println); - ExtensionMethodFunctional.Extensions.toList(Stream.of("a", "b", "c").map(String::toUpperCase)); + ExtensionMethodFunctional.Extensions.toList1(Stream.of("a", "b", "c").map(String::toUpperCase)); List i2 = ExtensionMethodFunctional.Extensions.toList2(Stream.of("a", "b", "c").map(String::toUpperCase)); } } -- cgit