RFR: 8375016: Several catch blocks for NullPointerExceptions exist in the codebase [v3]
Andy Goryachev
angorya at openjdk.org
Wed Jan 14 19:45:58 UTC 2026
On Tue, 13 Jan 2026 20:10:25 GMT, Christopher Schnick <duke at openjdk.org> 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:
>
> Remove unnecessary catch block
Looks good, thank you!
FYI there is another one https://bugs.openjdk.org/browse/JDK-8201135 which throws a bunch unnecessary exceptions during CSS color parsing, though the fix may not be as trivial.
-------------
Marked as reviewed by angorya (Reviewer).
PR Review: https://git.openjdk.org/jfx/pull/2032#pullrequestreview-3662336643
More information about the openjfx-dev
mailing list