RFR: 8264127: ListCell editing status is true, when index changes while editing [v13]
Jeanette Winzenburg
fastegal at openjdk.java.net
Mon May 17 08:45:45 UTC 2021
On Fri, 14 May 2021 13:26:55 GMT, Florian Kirmaier <fkirmaier at openjdk.org> wrote:
>> Fixing ListCell editing status is true, when index changes while editing.
>
> Florian Kirmaier has updated the pull request incrementally with one additional commit since the last revision:
>
> 8264127
> More changes, simplifications and tests based on CR
fix looks okay, commented the added test method inline.
BTW: I assume you will fix the trailing whitespace error in your next commit :)
modules/javafx.controls/src/test/java/test/javafx/scene/control/ListCellTest.java line 936:
> 934: assertFalse("cell must not be editing", cell.isEditing());
> 935: assertEquals("table must be editing at intermediate index", intermediate, list.getEditingIndex());
> 936: }
that's good - except for a minor omission: the catch-block is never reached, instead it is printed to sysout (or syserr, don't nail me) That happens because ExpressionHelper kind of swallows all exceptions in change notifications by passing them to the uncaughtExceptionHandler. To fix this, a test should un-/install (in After/Before methods) an uncaught exception handler. For examples, see f.i. TableCellTest.
really minor: replace "table" by "list" in the failure message :)
modules/javafx.controls/src/test/java/test/javafx/scene/control/ListCellTest.java line 947:
> 945: } finally {
> 946: assertFalse("cell must not be editing", cell.isEditing());
> 947: assertEquals("table editing must be cancelled by cell", notEditingIndex, list.getEditingIndex());
same minor c&p error as above
-------------
Changes requested by fastegal (Committer).
PR: https://git.openjdk.java.net/jfx/pull/441
More information about the openjfx-dev
mailing list