On Thu, 26 Aug 2021 14:09:58 GMT, Jeanette Winzenburg <faste...@openjdk.org> 
wrote:

> 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.

The fix looks good. 

Minor : Two comments from tests need to be removed.

modules/javafx.controls/src/test/java/test/javafx/scene/control/CellEditEventOfTableColumnTest.java
 line 179:

> 177: 
> 178:         ObservableList<String> model = 
> FXCollections.observableArrayList("Four", "Five", "Fear");
> 179:             // "Flop", "Food", "Fizz"

Did you forget to remove this comment?

modules/javafx.controls/src/test/java/test/javafx/scene/control/CellEditEventOfTreeTableColumnTest.java
 line 186:

> 184:         root.setExpanded(true);
> 185:         ObservableList<String> model = 
> FXCollections.observableArrayList("Four", "Five", "Fear");
> 186:             // "Flop", "Food", "Fizz"

Did you forget to remove this comment?

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

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

Reply via email to