diff options
author | Noel Grandin <noel@peralex.com> | 2014-08-20 13:48:58 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-10-07 13:20:00 +0200 |
commit | 610f3388c781055fcfc3f1ea8a027b1b9cbc5bae (patch) | |
tree | 563e9c044e7261c6e9d60adedb2b2481227379f7 /toolkit/test/accessibility | |
parent | 831051f55e22e909cc140e3ec4d1aae282a92fcd (diff) |
java: no need to check for null before calling instanceof
the instanceof check returns false when passed a null value
Change-Id: I7742d0d9cf25ef23d9adee7328f701c7efeea8b5
Diffstat (limited to 'toolkit/test/accessibility')
-rw-r--r-- | toolkit/test/accessibility/AccessibilityTreeModelBase.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/toolkit/test/accessibility/AccessibilityTreeModelBase.java b/toolkit/test/accessibility/AccessibilityTreeModelBase.java index b15379e7d994..5ff2d96c9e48 100644 --- a/toolkit/test/accessibility/AccessibilityTreeModelBase.java +++ b/toolkit/test/accessibility/AccessibilityTreeModelBase.java @@ -52,7 +52,7 @@ public class AccessibilityTreeModelBase Object aChild = null; try { - if (aParent != null && aParent instanceof AccessibleTreeNode) + if (aParent instanceof AccessibleTreeNode) aChild = ((AccessibleTreeNode)aParent).getChild(nIndex); else System.out.println ("getChild called for unknown parent node"); @@ -69,7 +69,7 @@ public class AccessibilityTreeModelBase Object aChild = null; try { - if (aParent != null && aParent instanceof AccessibleTreeNode) + if (aParent instanceof AccessibleTreeNode) aChild = ((AccessibleTreeNode)aParent).getChildNoCreate(nIndex); else System.out.println ("getChild called for unknown parent node"); |