From 8b933a510a5eb846e429ee5e28486435b70466c5 Mon Sep 17 00:00:00 2001 From: Grzegorz Piwowarek Date: Sat, 17 Aug 2024 18:28:26 +0200 Subject: [PATCH] Qualify all yield() calls (#2799) Unqualified calls to `yield()` method are not supported since Java 14. `yield` is now an integral part of the switch expression: [https://openjdk.org/jeps/361](link) --- pom.xml | 4 ++-- vavr/generator/Generator.scala | 2 +- vavr/src-gen/main/java/io/vavr/API.java | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pom.xml b/pom.xml index 18806582f..54d51b8aa 100644 --- a/pom.xml +++ b/pom.xml @@ -73,12 +73,12 @@ We use these goals frequently to keep the dependencies and plugins up-to-date: 3.8.0 3.0.0-M1 1.6 - 0.8.2 + 0.8.12 3.1.1 3.0.1 2.5.3 2.7 - 3.0.0-M3 + 3.3.1 3.0.1 1.5.0 3.4.4 diff --git a/vavr/generator/Generator.scala b/vavr/generator/Generator.scala index 3741fa3cb..1ba0608c0 100644 --- a/vavr/generator/Generator.scala +++ b/vavr/generator/Generator.scala @@ -838,7 +838,7 @@ def generateMainClasses(): Unit = { * @return an {@code Iterator} of mapped results */ public $rtype yield() { - return yield(Function.identity()); + return this.yield(Function.identity()); } """)} } diff --git a/vavr/src-gen/main/java/io/vavr/API.java b/vavr/src-gen/main/java/io/vavr/API.java index f6935af61..4f497fa92 100644 --- a/vavr/src-gen/main/java/io/vavr/API.java +++ b/vavr/src-gen/main/java/io/vavr/API.java @@ -3260,7 +3260,7 @@ public Iterator yield(Function f) { * @return an {@code Iterator} of mapped results */ public Iterator yield() { - return yield(Function.identity()); + return this.yield(Function.identity()); } } @@ -3559,7 +3559,7 @@ public Option yield(Function f) { * @return an {@code Iterator} of mapped results */ public Option yield() { - return yield(Function.identity()); + return this.yield(Function.identity()); } } @@ -3858,7 +3858,7 @@ public Future yield(Function f) { * @return an {@code Iterator} of mapped results */ public Future yield() { - return yield(Function.identity()); + return this.yield(Function.identity()); } } @@ -4157,7 +4157,7 @@ public Try yield(Function f) { * @return an {@code Iterator} of mapped results */ public Try yield() { - return yield(Function.identity()); + return this.yield(Function.identity()); } } @@ -4456,7 +4456,7 @@ public List yield(Function f) { * @return an {@code Iterator} of mapped results */ public List yield() { - return yield(Function.identity()); + return this.yield(Function.identity()); } } @@ -5654,4 +5654,4 @@ public boolean isDefinedAt(T obj) { } } } -} \ No newline at end of file +}