Skip to content

Commit

Permalink
Qualify all yield() calls (#2799)
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
pivovarit authored Aug 17, 2024
1 parent fd5ff09 commit 8b933a5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,12 @@ We use these goals frequently to keep the dependencies and plugins up-to-date:
<maven.compiler.version>3.8.0</maven.compiler.version>
<maven.deploy.version>3.0.0-M1</maven.deploy.version>
<maven.gpg.version>1.6</maven.gpg.version>
<maven.jacoco.version>0.8.2</maven.jacoco.version>
<maven.jacoco.version>0.8.12</maven.jacoco.version>
<maven.jar.version>3.1.1</maven.jar.version>
<maven.javadoc.version>3.0.1</maven.javadoc.version>
<maven.release.version>2.5.3</maven.release.version>
<maven.versions.version>2.7</maven.versions.version>
<maven.surefire.version>3.0.0-M3</maven.surefire.version>
<maven.surefire.version>3.3.1</maven.surefire.version>
<maven.source.version>3.0.1</maven.source.version>
<maven.exec.version>1.5.0</maven.exec.version>
<scala.maven.version>3.4.4</scala.maven.version>
Expand Down
2 changes: 1 addition & 1 deletion vavr/generator/Generator.scala
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,7 @@ def generateMainClasses(): Unit = {
* @return an {@code Iterator} of mapped results
*/
public $rtype<T1> yield() {
return yield(Function.identity());
return this.yield(Function.identity());
}
""")}
}
Expand Down
12 changes: 6 additions & 6 deletions vavr/src-gen/main/java/io/vavr/API.java
Original file line number Diff line number Diff line change
Expand Up @@ -3260,7 +3260,7 @@ public <R> Iterator<R> yield(Function<? super T1, ? extends R> f) {
* @return an {@code Iterator} of mapped results
*/
public Iterator<T1> yield() {
return yield(Function.identity());
return this.yield(Function.identity());
}
}

Expand Down Expand Up @@ -3559,7 +3559,7 @@ public <R> Option<R> yield(Function<? super T1, ? extends R> f) {
* @return an {@code Iterator} of mapped results
*/
public Option<T1> yield() {
return yield(Function.identity());
return this.yield(Function.identity());
}
}

Expand Down Expand Up @@ -3858,7 +3858,7 @@ public <R> Future<R> yield(Function<? super T1, ? extends R> f) {
* @return an {@code Iterator} of mapped results
*/
public Future<T1> yield() {
return yield(Function.identity());
return this.yield(Function.identity());
}
}

Expand Down Expand Up @@ -4157,7 +4157,7 @@ public <R> Try<R> yield(Function<? super T1, ? extends R> f) {
* @return an {@code Iterator} of mapped results
*/
public Try<T1> yield() {
return yield(Function.identity());
return this.yield(Function.identity());
}
}

Expand Down Expand Up @@ -4456,7 +4456,7 @@ public <R> List<R> yield(Function<? super T1, ? extends R> f) {
* @return an {@code Iterator} of mapped results
*/
public List<T1> yield() {
return yield(Function.identity());
return this.yield(Function.identity());
}
}

Expand Down Expand Up @@ -5654,4 +5654,4 @@ public boolean isDefinedAt(T obj) {
}
}
}
}
}

0 comments on commit 8b933a5

Please sign in to comment.