On Sat, 7 Jun 2025 20:12:10 GMT, Nir Lisker <nlis...@openjdk.org> wrote:

>> John Hendrikx has updated the pull request incrementally with two additional 
>> commits since the last revision:
>> 
>>  - Change StackOverflowException to warning log
>>  - Support keeping last message in Logging helper
>
> modules/javafx.base/src/test/java/test/javafx/beans/ObservableValueTest.java 
> line 126:
> 
>> 124: 
>> 125:             action.removeListener(obs -> {});
>> 126:             action.removeListener((obs, old, current) -> {});
> 
> These can use the unnamed variables pattern `_`. Also in other places.

I think that just hurts readability.  This makes it clear that one is a dummy 
invalidation listener and the other is a dummy change listener.  I think that 
even goes for almost all uses of `_` except maybe for deconstruction patterns 
(as the record name is still mentioned then).  The extra variable name(s) 
help(s) to see which kind of lambda it is.

-------------

PR Review Comment: https://git.openjdk.org/jfx/pull/1081#discussion_r2134558373

Reply via email to