From 2491812ba01c4209cad9594bb7fbdfc2be82f49d Mon Sep 17 00:00:00 2001 From: delvh Date: Mon, 3 Aug 2020 15:10:35 +0200 Subject: [PATCH] Apply code review suggestions from @CyB3RC0nN0R 2 --- .../java/envoy/client/ui/listcell/AbstractListCell.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/src/main/java/envoy/client/ui/listcell/AbstractListCell.java b/client/src/main/java/envoy/client/ui/listcell/AbstractListCell.java index 0bbe20b..2a527fd 100644 --- a/client/src/main/java/envoy/client/ui/listcell/AbstractListCell.java +++ b/client/src/main/java/envoy/client/ui/listcell/AbstractListCell.java @@ -35,8 +35,10 @@ public abstract class AbstractListCell extends ListCell { @Override protected final void updateItem(T item, boolean empty) { super.updateItem(item, empty); - setGraphic(empty || item == null ? null : renderItem(item)); - if (!empty) setCursor(Cursor.HAND); + if (!(empty || item == null)) { + setCursor(Cursor.HAND); + setGraphic(renderItem(item)); + } } /**