diff options
author | Ahmed Ashour <asashour@yahoo.com> | 2017-10-12 08:00:02 +0200 |
---|---|---|
committer | Henri Sara <henri.sara@gmail.com> | 2017-10-12 09:00:02 +0300 |
commit | 13d406a7086cc1546eac3fa86f6263bfb436de85 (patch) | |
tree | c571de7cc72bdcad1d8473266dbcdd76a2b0487b /client | |
parent | d0b5741b81d214491c93d4d042c79e10bb4f192e (diff) | |
download | vaadin-framework-13d406a7086cc1546eac3fa86f6263bfb436de85.tar.gz vaadin-framework-13d406a7086cc1546eac3fa86f6263bfb436de85.zip |
Remove redundant null checks before an instanceof (#10173)
Diffstat (limited to 'client')
-rw-r--r-- | client/src/main/java/com/vaadin/client/Util.java | 3 | ||||
-rw-r--r-- | client/src/main/java/com/vaadin/client/ui/VAbstractCalendarPanel.java | 6 |
2 files changed, 3 insertions, 6 deletions
diff --git a/client/src/main/java/com/vaadin/client/Util.java b/client/src/main/java/com/vaadin/client/Util.java index a27e92bd82..517727e75e 100644 --- a/client/src/main/java/com/vaadin/client/Util.java +++ b/client/src/main/java/com/vaadin/client/Util.java @@ -1249,8 +1249,7 @@ public class Util { private static HasChildMeasurementHintConnector getPossibleChildMeasurementHintParentConnector( ComponentConnector candidate) { ServerConnector parent = candidate.getParent(); - if (parent != null - && parent instanceof HasChildMeasurementHintConnector) { + if (parent instanceof HasChildMeasurementHintConnector) { return (HasChildMeasurementHintConnector) parent; } return null; diff --git a/client/src/main/java/com/vaadin/client/ui/VAbstractCalendarPanel.java b/client/src/main/java/com/vaadin/client/ui/VAbstractCalendarPanel.java index 3d8aa14862..383d67ce70 100644 --- a/client/src/main/java/com/vaadin/client/ui/VAbstractCalendarPanel.java +++ b/client/src/main/java/com/vaadin/client/ui/VAbstractCalendarPanel.java @@ -247,8 +247,7 @@ public abstract class VAbstractCalendarPanel<R extends Enum<R>> int cellCount = days.getCellCount(i); for (int j = 0; j < cellCount; j++) { Widget widget = days.getWidget(i, j); - if (widget != null - && widget instanceof VAbstractCalendarPanel.Day) { + if (widget instanceof VAbstractCalendarPanel.Day) { Day curday = (Day) widget; if (curday.getDate().equals(date)) { curday.addStyleDependentName(CN_FOCUSED); @@ -358,8 +357,7 @@ public abstract class VAbstractCalendarPanel<R extends Enum<R>> int cellCount = days.getCellCount(i); for (int j = 0; j < cellCount; j++) { Widget widget = days.getWidget(i, j); - if (widget != null - && widget instanceof VAbstractCalendarPanel.Day) { + if (widget instanceof VAbstractCalendarPanel.Day) { Day curday = (Day) widget; if (curday.getDate().equals(date)) { curday.addStyleDependentName(CN_SELECTED); |