RFR: 8264127: ListCell editing status is true, when index changes while editing [v14]
Ajit Ghaisas
aghaisas at openjdk.java.net
Thu May 20 07:05:38 UTC 2021
On Tue, 18 May 2021 10:14:11 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 two additional commits since the last revision:
>
> - 8264127
> fixed assertion text,
> exception handler is now installed/uninstalled like in TableCellTest
> - 8264127
> fixed trailing whitespace
Fix are tests look good to me.
I have listed minor editing comments.
modules/javafx.controls/src/main/java/javafx/scene/control/ListCell.java line 543:
> 541: final int editIndex = list == null ? -1 : list.getEditingIndex();
> 542: final boolean editing = isEditing();
> 543: final boolean match = list != null && index != -1 && index == editIndex;
Minor : Readability can be improved with brackets around the conditions.
(list != null) && (index != -1) && (index == editIndex);
modules/javafx.controls/src/main/java/javafx/scene/control/ListCell.java line 545:
> 543: final boolean match = list != null && index != -1 && index == editIndex;
> 544:
> 545: if (match && ! editing) {
Minor : code convention : there should not be a space after `!`
modules/javafx.controls/src/main/java/javafx/scene/control/ListCell.java line 547:
> 545: if (match && ! editing) {
> 546: startEdit();
> 547: } else if (! match && editing) {
Minor : code convention : there should not be a space after !
-------------
PR: https://git.openjdk.java.net/jfx/pull/441
More information about the openjfx-dev
mailing list