diff options
author | rbuj <robert.buj@gmail.com> | 2014-07-28 10:58:51 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2014-07-28 10:20:57 +0000 |
commit | 2505225c6ff7ea4e53fa3ada3ab43affd0a4fd00 (patch) | |
tree | 55a7bf6460be70b3a1d143abdd008830dfb28a3c /xmerge | |
parent | a9a944eab5edae826767fabdbc12ee4e74d76d23 (diff) |
xmerge: If statement is redundant
Change-Id: I62914ab65258de36790387b7a8865a32b0d7bca6
Reviewed-on: https://gerrit.libreoffice.org/10587
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'xmerge')
3 files changed, 9 insertions, 21 deletions
diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/ParaNodeIterator.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/ParaNodeIterator.java index 23ba1d3b7f07..48d63474f648 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/ParaNodeIterator.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/ParaNodeIterator.java @@ -67,13 +67,9 @@ public final class ParaNodeIterator extends NodeIterator { // can use an array later to check all possible tags for // future expansion - if (node.getNodeType() == Node.ELEMENT_NODE && - (node.getNodeName().equals(SUPPORTED_TAG1) || - node.getNodeName().equals(SUPPORTED_TAG2))) { - return true; - } else { - return false; - } + return node.getNodeType() == Node.ELEMENT_NODE && + (node.getNodeName().equals(SUPPORTED_TAG1) || + node.getNodeName().equals(SUPPORTED_TAG2)); } } diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/RowIterator.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/RowIterator.java index 779393e33540..02ac53f37a4c 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/RowIterator.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/RowIterator.java @@ -56,12 +56,8 @@ public final class RowIterator extends NodeIterator { // can use an array later to check all possible tags for // future expansion - if (node.getNodeType() == Node.ELEMENT_NODE && - node.getNodeName().equals(OfficeConstants.TAG_TABLE_ROW)) { - return true; - } else { - return false; - } + return node.getNodeType() == Node.ELEMENT_NODE && + node.getNodeName().equals(OfficeConstants.TAG_TABLE_ROW); } } diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/TextNodeIterator.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/TextNodeIterator.java index 24509141d2d5..61b886b99aa1 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/TextNodeIterator.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/TextNodeIterator.java @@ -60,14 +60,10 @@ public final class TextNodeIterator extends NodeIterator { // can use an array later to check all possible tags for // future expansion - if (node.getNodeType() == Node.TEXT_NODE || - node.getNodeName().equals(OfficeConstants.TAG_SPACE) || - node.getNodeName().equals(OfficeConstants.TAG_TAB_STOP) || - node.getNodeName().equals(OfficeConstants.TAG_LINE_BREAK)) { - return true; - } else { - return false; - } + return node.getNodeType() == Node.TEXT_NODE || + node.getNodeName().equals(OfficeConstants.TAG_SPACE) || + node.getNodeName().equals(OfficeConstants.TAG_TAB_STOP) || + node.getNodeName().equals(OfficeConstants.TAG_LINE_BREAK); } } |