diff options
author | rbuj <robert.buj@gmail.com> | 2014-07-31 20:03:30 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2014-08-01 06:32:27 +0000 |
commit | 583a35b7872be903520dd9fc342efde23ade929f (patch) | |
tree | 6e11715aa5b8e97fbcdfa58c77ff931425996afb /xmerge | |
parent | e36edbb3e5dee78c32dea2a68067906101f4a7c8 (diff) |
xmerge: If statement is redundant
Change-Id: I1d4000ae68d109ed01d4197a71f9175f79aa59f0
Reviewed-on: https://gerrit.libreoffice.org/10668
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'xmerge')
-rw-r--r-- | xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/CellNodeIterator.java | 8 | ||||
-rw-r--r-- | xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/DocumentMerge.java | 6 |
2 files changed, 3 insertions, 11 deletions
diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/CellNodeIterator.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/CellNodeIterator.java index 16102e831fc4..c2cad735c5f9 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/CellNodeIterator.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/CellNodeIterator.java @@ -65,12 +65,8 @@ public final class CellNodeIterator 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)) { - return true; - } else { - return false; - } + return node.getNodeType() == Node.ELEMENT_NODE && + node.getNodeName().equals(SUPPORTED_TAG1); } diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/DocumentMerge.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/DocumentMerge.java index a4ba311964da..cd939b799ddd 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/DocumentMerge.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/DocumentMerge.java @@ -67,11 +67,7 @@ public class DocumentMerge implements MergeAlgorithm { for (Difference difference : differences) { if (difference.getOrgPosition() > currentPosition) { currentPosition = difference.getOrgPosition(); - if (difference.getOperation() == Difference.DELETE) { - haveDeleteOperation = true; - } else { - haveDeleteOperation = false; - } + haveDeleteOperation = difference.getOperation() == Difference.DELETE; } else if (difference.getOrgPosition() == currentPosition) { if (difference.getOperation() == Difference.DELETE) { haveDeleteOperation = true; |