-
Notifications
You must be signed in to change notification settings - Fork 101
Closed
Labels
Description
(Coming from https://rewriteoss.slack.com/archives/C01A843MWG5/p1746783424812409?thread_ts=1746773248.912599&cid=C01A843MWG5)
What problem are you trying to solve?
I use Java 24. There, JEP 456: Unnamed Variables & Patterns is supported very well.
Example:
- this.customizeExpertSettings.addListener((observableValue, oldValue, newValue) ->
+ this.customizeExpertSettings.addListener((_, _, newValue) ->
Full example of our prject: https://github.com/JabRef/jabref/pull/13084/files
What precondition(s) should be checked before applying this recipe?
Variable unused.
Describe the situation before applying the recipe
Variable not used in a lambda input
Describe the situation after applying the recipe
Variable replaced by _
Have you considered any alternatives or workarounds?
Following IntelliJs auto marking as gray and replacing by _
.
Any additional context
- JEP 456: Unnamed Variables & Patterns](https://openjdk.org/jeps/456)
Are you interested in contributing this recipe to OpenRewrite?
If I only had time...
timtebeek and estekhin
Metadata
Metadata
Labels
Type
Projects
Status
Done