aboutsummaryrefslogtreecommitdiff
path: root/test/transform
diff options
context:
space:
mode:
authorReinier Zwitserloot <r.zwitserloot@projectlombok.org>2022-04-02 06:20:23 +0200
committerGitHub <noreply@github.com>2022-04-02 06:20:23 +0200
commit71fcc0a60b5da50e5dd0feee3b3db8bf45327fea (patch)
treed17b958094a9098fd0af1fe379cab1d286c75149 /test/transform
parent1eb1a8be3c002b4573ca12f4680b724f9a35f6e1 (diff)
parentd4975cf6dd959120fe91614907800de058993d50 (diff)
downloadlombok-71fcc0a60b5da50e5dd0feee3b3db8bf45327fea.tar.gz
lombok-71fcc0a60b5da50e5dd0feee3b3db8bf45327fea.tar.bz2
lombok-71fcc0a60b5da50e5dd0feee3b3db8bf45327fea.zip
Merge pull request #3155 from Rawi01/extensionmethod-conditional-methodref
Improve the handling of ExtensionMethod arguments
Diffstat (limited to 'test/transform')
-rw-r--r--test/transform/resource/after-delombok/ExtensionMethodFunctional.java1
-rw-r--r--test/transform/resource/after-ecj/ExtensionMethodFunctional.java1
-rw-r--r--test/transform/resource/before/ExtensionMethodFunctional.java2
3 files changed, 4 insertions, 0 deletions
diff --git a/test/transform/resource/after-delombok/ExtensionMethodFunctional.java b/test/transform/resource/after-delombok/ExtensionMethodFunctional.java
index 2b82a957..40d0d4df 100644
--- a/test/transform/resource/after-delombok/ExtensionMethodFunctional.java
+++ b/test/transform/resource/after-delombok/ExtensionMethodFunctional.java
@@ -11,6 +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.consume(test, test.length() > 0 ? System.out::println : null);
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/after-ecj/ExtensionMethodFunctional.java b/test/transform/resource/after-ecj/ExtensionMethodFunctional.java
index 0971a9be..3cd29e44 100644
--- a/test/transform/resource/after-ecj/ExtensionMethodFunctional.java
+++ b/test/transform/resource/after-ecj/ExtensionMethodFunctional.java
@@ -36,6 +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.consume(test, ((test.length() > 0) ? System.out::println : null));
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 8586dd7a..20fe2a36 100644
--- a/test/transform/resource/before/ExtensionMethodFunctional.java
+++ b/test/transform/resource/before/ExtensionMethodFunctional.java
@@ -16,6 +16,8 @@ class ExtensionMethodFunctional {
test.consume(s -> System.out.println("1: " + s), s -> System.out.println("2: " + s));
test.consume(System.out::println, System.out::println);
+ test.consume(test.length() > 0 ? System.out::println : null);
+
Stream.of("a", "b", "c").map(String::toUpperCase).toList1();
List<Integer> i2 = Stream.of("a", "b", "c").map(String::toUpperCase).toList2();
}