On Tue, 25 Aug 2026 10:25:13 GMT, Marius Hanl <[email protected]> wrote:

>> Kevin Rushforth has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   document that WeakReferenceWrapper might be modified or eliminated in the 
>> future
>
> modules/javafx.controls/src/test/java/test/com/sun/javafx/scene/control/WeakReferenceWrapperTest.java
>  line 40:
> 
>> 38: 
>> 39:     // POJO with identity
>> 40:     static class POJO {
> 
> Minor: Could be a `record`

Yes, it could have been since records are identity classes by default. I think 
I'll leave it as is though.

> modules/javafx.controls/src/test/java/test/com/sun/javafx/scene/control/WeakReferenceWrapperTest.java
>  line 66:
> 
>> 64:     @Test
>> 65:     public void testWeakReferenceWrapper() {
>> 66:         var nullRef = new WeakReferenceWrapper<Object>(null);
> 
> Minor: Here and below, the type argument `<>` can also be removed.
> Just checked, the left `var` side is always able to infer the correct type.

I wasn't sure that would work for null, but I prefer to leave it as is to be 
more self-documenting (although it really wouldn't matter hear, that's one of 
the drawbacks of `var` some times).

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

PR Review Comment: https://git.openjdk.org/jfx/pull/2250#discussion_r3865195571
PR Review Comment: https://git.openjdk.org/jfx/pull/2250#discussion_r3865208212

Reply via email to