summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-08-20 13:48:58 +0200
committerNoel Grandin <noel@peralex.com>2014-10-07 13:20:00 +0200
commit610f3388c781055fcfc3f1ea8a027b1b9cbc5bae (patch)
tree563e9c044e7261c6e9d60adedb2b2481227379f7 /toolkit
parent831051f55e22e909cc140e3ec4d1aae282a92fcd (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')
-rw-r--r--toolkit/test/accessibility/AccessibilityTreeModelBase.java4
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");