aboutsummaryrefslogtreecommitdiff
path: root/test/transform
diff options
context:
space:
mode:
authorRoel Spilker <r.spilker@gmail.com>2021-03-19 03:35:59 +0100
committerRoel Spilker <r.spilker@gmail.com>2021-03-19 03:35:59 +0100
commit334167bd22cc21c59bd6f4a49dec7057a615206b (patch)
tree48d69a25d697a9fb435934a0728549a7d7504d09 /test/transform
parent251b7541b7cd446286ce9ea4dac00f59440a62ca (diff)
downloadlombok-334167bd22cc21c59bd6f4a49dec7057a615206b.tar.gz
lombok-334167bd22cc21c59bd6f4a49dec7057a615206b.tar.bz2
lombok-334167bd22cc21c59bd6f4a49dec7057a615206b.zip
[jdk16] Suddenly, Stream has a default method toList :-)
Diffstat (limited to 'test/transform')
-rw-r--r--test/transform/resource/after-delombok/ExtensionMethodFunctional.java4
-rw-r--r--test/transform/resource/after-ecj/ExtensionMethodFunctional.java4
-rw-r--r--test/transform/resource/before/ExtensionMethodFunctional.java4
3 files changed, 6 insertions, 6 deletions
diff --git a/test/transform/resource/after-delombok/ExtensionMethodFunctional.java b/test/transform/resource/after-delombok/ExtensionMethodFunctional.java
index 45602fa6..2b82a957 100644
--- a/test/transform/resource/after-delombok/ExtensionMethodFunctional.java
+++ b/test/transform/resource/after-delombok/ExtensionMethodFunctional.java
@@ -11,7 +11,7 @@ class ExtensionMethodFunctional {
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<Integer> i2 = ExtensionMethodFunctional.Extensions.toList2(Stream.of("a", "b", "c").map(String::toUpperCase));
}
@@ -31,7 +31,7 @@ class ExtensionMethodFunctional {
}
}
- public static <T> List<T> toList(Stream<T> stream) {
+ public static <T> List<T> toList1(Stream<T> stream) {
return (List<T>) stream.collect(Collectors.toList());
}
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 <T>List<T> toList(Stream<T> stream) {
+ public static <T>List<T> toList1(Stream<T> stream) {
return (List<T>) stream.collect(Collectors.toList());
}
public static <T, U>List<U> toList2(Stream<T> stream) {
@@ -36,7 +36,7 @@ import lombok.experimental.ExtensionMethod;
test = ExtensionMethodFunctional.Extensions.map(test, (<no type> s) -> ExtensionMethodFunctional.Extensions.reverse(s));
ExtensionMethodFunctional.Extensions.consume(test, (<no type> s) -> System.out.println(("1: " + s)), (<no type> 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<Integer> i2 = ExtensionMethodFunctional.Extensions.toList2(Stream.of("a", "b", "c").map(String::toUpperCase));
}
}
diff --git a/test/transform/resource/before/ExtensionMethodFunctional.java b/test/transform/resource/before/ExtensionMethodFunctional.java
index a9e7dd9f..8586dd7a 100644
--- a/test/transform/resource/before/ExtensionMethodFunctional.java
+++ b/test/transform/resource/before/ExtensionMethodFunctional.java
@@ -16,7 +16,7 @@ class ExtensionMethodFunctional {
test.consume(s -> System.out.println("1: " + s), s -> System.out.println("2: " + s));
test.consume(System.out::println, System.out::println);
- Stream.of("a", "b", "c").map(String::toUpperCase).toList();
+ Stream.of("a", "b", "c").map(String::toUpperCase).toList1();
List<Integer> i2 = Stream.of("a", "b", "c").map(String::toUpperCase).toList2();
}
@@ -36,7 +36,7 @@ class ExtensionMethodFunctional {
}
}
- public static <T> List<T> toList(Stream<T> stream) {
+ public static <T> List<T> toList1(Stream<T> stream) {
return (List<T>) stream.collect(Collectors.toList());
}