RFR: 8375016: Several catch blocks for NullPointerExceptions exist in the codebase [v3]

Andy Goryachev angorya at openjdk.org
Wed Jan 14 19:46:02 UTC 2026


On Mon, 12 Jan 2026 17:19:17 GMT, Andy Goryachev <angorya at openjdk.org> wrote:

>> Christopher Schnick has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Remove unnecessary catch block
>
> modules/javafx.base/src/main/java/com/sun/javafx/binding/SelectBinding.java line 199:
> 
>> 197:                 return numberVal.doubleValue();
>> 198:             } else if (val != null) {
>> 199:                 Logging.getLogger().warning("Value of select-binding has wrong type, returning default value.");
> 
> minor: I would re-phrase it as something like "Expecting a Number value" (here and elsewhere)

Exception message says "expecting XXX" in Bindings, but not here, I am just curious why?

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

PR Review Comment: https://git.openjdk.org/jfx/pull/2032#discussion_r2691695046


More information about the openjfx-dev mailing list