RFR: 8269871: CellEditEvent: must not throw NPE in accessors [v2]

Jeanette Winzenburg fastegal at openjdk.java.net
Sat Sep 4 08:57:28 UTC 2021


> The issue is unguarded access to tablePosition though it might be null (since [JDK-8120610](https://bugs.openjdk.java.net/browse/JDK-8120610)
> 
> The fix is to check against null in each accessor. Also required to fix the default onEditCommit handlers in Tree/TableColumn to really cope with null TablePostion on the event.
> 
> Added tests that failed/pass before/after the fix.
> 
> Note that there was an old test (in Tree/TableColumnTest each), that failed after the fix because it expected the NPE. Fixed by removing the expected parameter.

Jeanette Winzenburg has updated the pull request incrementally with one additional commit since the last revision:

  removed forgotten code comments in tests as per review

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

Changes:
  - all: https://git.openjdk.java.net/jfx/pull/611/files
  - new: https://git.openjdk.java.net/jfx/pull/611/files/b6540a2d..7082541d

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jfx&pr=611&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jfx&pr=611&range=00-01

  Stats: 2 lines in 2 files changed: 0 ins; 2 del; 0 mod
  Patch: https://git.openjdk.java.net/jfx/pull/611.diff
  Fetch: git fetch https://git.openjdk.java.net/jfx pull/611/head:pull/611

PR: https://git.openjdk.java.net/jfx/pull/611


More information about the openjfx-dev mailing list