diff options
author | Noel Grandin <noel@peralex.com> | 2012-08-21 09:07:44 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-08-28 16:15:43 +0200 |
commit | 4e2c95c786ecd5931e6fb7f2ceda5c203350f305 (patch) | |
tree | d95d9c8d3372b78250732d837ce6e433078acd0b /accessibility/bridge | |
parent | Java cleanup - remove unused local fields and variables and parameters (diff) | |
download | core-4e2c95c786ecd5931e6fb7f2ceda5c203350f305.tar.gz core-4e2c95c786ecd5931e6fb7f2ceda5c203350f305.zip |
Java cleanup - remove unnecessary null checks
Change-Id: I72a847b1180e9aeb8dec18bcaedee7286eee7754
Diffstat (limited to 'accessibility/bridge')
3 files changed, 8 insertions, 14 deletions
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/List.java b/accessibility/bridge/org/openoffice/java/accessibility/List.java index ae6dd02103cf..cfa9e19f3924 100644 --- a/accessibility/bridge/org/openoffice/java/accessibility/List.java +++ b/accessibility/bridge/org/openoffice/java/accessibility/List.java @@ -253,10 +253,8 @@ public class List extends DescendantManager implements javax.accessibility.Acces XAccessibleContext xAccessibleContext = unoAccessible.getAccessibleContext(); if (xAccessibleContext != null) { javax.accessibility.AccessibleContext ac = new AccessibleListItem(xAccessibleContext); - if (ac != null) { - ac.setAccessibleParent(List.this); - accessibleContext = ac; - } + ac.setAccessibleParent(List.this); + accessibleContext = ac; AccessibleStateAdapter.setComponentState(this, xAccessibleContext.getAccessibleStateSet()); } } catch (com.sun.star.uno.RuntimeException e) { diff --git a/accessibility/bridge/org/openoffice/java/accessibility/Table.java b/accessibility/bridge/org/openoffice/java/accessibility/Table.java index 2e587f29e295..5896082287b8 100644 --- a/accessibility/bridge/org/openoffice/java/accessibility/Table.java +++ b/accessibility/bridge/org/openoffice/java/accessibility/Table.java @@ -478,11 +478,9 @@ public class Table extends DescendantManager implements javax.accessibility.Acce try { XAccessibleContext xAccessibleContext = unoAccessible.getAccessibleContext(); if (xAccessibleContext != null) { - javax.accessibility.AccessibleContext ac = new AccessibleTableCell(xAccessibleContext); - if (ac != null) { - ac.setAccessibleParent(Table.this); - accessibleContext = ac; - } + javax.accessibility.AccessibleContext ac = new AccessibleTableCell(xAccessibleContext); + ac.setAccessibleParent(Table.this); + accessibleContext = ac; } } catch (com.sun.star.uno.RuntimeException e) { } diff --git a/accessibility/bridge/org/openoffice/java/accessibility/Tree.java b/accessibility/bridge/org/openoffice/java/accessibility/Tree.java index 1291f555854d..a0a59c91694e 100644 --- a/accessibility/bridge/org/openoffice/java/accessibility/Tree.java +++ b/accessibility/bridge/org/openoffice/java/accessibility/Tree.java @@ -490,11 +490,9 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces try { XAccessibleContext xAccessibleContext = unoAccessible.getAccessibleContext(); if (xAccessibleContext != null) { - javax.accessibility.AccessibleContext ac = new AccessibleTreeItem(xAccessibleContext); - if (ac != null) { - ac.setAccessibleParent(Tree.this); - accessibleContext = ac; - } + javax.accessibility.AccessibleContext ac = new AccessibleTreeItem(xAccessibleContext); + ac.setAccessibleParent(Tree.this); + accessibleContext = ac; } } catch (com.sun.star.uno.RuntimeException e) { } |