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

Christopher Schnick duke at openjdk.org
Mon Jan 12 14:19:42 UTC 2026


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.

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

Commit messages:
 - Fixes
 - More fixes
 - Handle exceptions better

Changes: https://git.openjdk.org/jfx/pull/2032/files
  Webrev: https://webrevs.openjdk.org/?repo=jfx&pr=2032&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8375016
  Stats: 371 lines in 9 files changed: 8 ins; 215 del; 148 mod
  Patch: https://git.openjdk.org/jfx/pull/2032.diff
  Fetch: git fetch https://git.openjdk.org/jfx.git pull/2032/head:pull/2032

PR: https://git.openjdk.org/jfx/pull/2032


More information about the openjfx-dev mailing list