On Thu, 15 Jan 2026 18:39:01 GMT, Christopher Schnick <[email protected]> wrote:

>> This PR replaces various catch blocks for NPEs by proper null checks. It 
>> looks like a lot but most of the binding changes are just variants of the 
>> same approach. The test cases have been adapted to not check for NPEs 
>> anymore.
>> 
>> The PrismFontFactory change to a RuntimeException was made because I don't 
>> see how the try block can throw an NPE.
>
> Christopher Schnick has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Fix failing tests

Changes requested by angorya (Reviewer).

modules/javafx.base/src/main/java/com/sun/javafx/binding/SelectBinding.java 
line 97:

> 95:             // The type returned might be wrong, but this would not throw 
> any ClassCastException here
> 96:             // Any casting issue would happen outside this method
> 97:             return (T) observable.getValue();

so this is NOT an equivalent change, and therefore would need a deeper analysis 
- I, for example, can't tell if this change makes sense or not right away.  
Some objects' `toString()` value may not make sense.

I would suggest to revert this change to keep the PR at the "light 
optimization" level.

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

PR Review: https://git.openjdk.org/jfx/pull/2032#pullrequestreview-3667058234
PR Review Comment: https://git.openjdk.org/jfx/pull/2032#discussion_r2695540780

Reply via email to