Skip to content

Commit e1de809

Browse files
committed
Avoid unnamed lambda parameter in UpgradeFacesOpenSourceLibrariesTest
The recipe rewrote `(a, b) -> b` to `(_, b) -> b`, but the build's Java 21 toolchain rejects unnamed variables (a Java 22 feature) without --enable-preview. Restore the named parameter so compileTestJava succeeds on Java 21.
1 parent 9028ee8 commit e1de809

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/test/java/org/openrewrite/java/migrate/jakarta/UpgradeFacesOpenSourceLibrariesTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ void changeVersionAndAddClassfier() {
5252
""",
5353
spec -> spec.after(actual -> {
5454
String version = Pattern.compile("<version>(14\\.0\\.\\d+)</version>")
55-
.matcher(actual).results().reduce((_, b) -> b).orElseThrow().group(1);
55+
.matcher(actual).results().reduce((a, b) -> b).orElseThrow().group(1);
5656
return """
5757
<?xml version="1.0" encoding="UTF-8"?>
5858
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

0 commit comments

Comments
 (0)