Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Delaigue2015-01-21 14:47:49 +0000
committerLaurent Delaigue2015-01-21 14:48:37 +0000
commit31610874aebf22d40071810d6f7851076b0d9122 (patch)
treecf866429c3f0dd2c934b100e3981667eafe58e57
parent816f112dcb4e2c17213f90b96b0e8f0fdbf40852 (diff)
downloadorg.eclipse.emf.compare-31610874aebf22d40071810d6f7851076b0d9122.tar.gz
org.eclipse.emf.compare-31610874aebf22d40071810d6f7851076b0d9122.tar.xz
org.eclipse.emf.compare-31610874aebf22d40071810d6f7851076b0d9122.zip
Happy boy-scout: Fixed findbugs warning.
The same condition was tested twice in imbricated ifs. Change-Id: I5fc4f735e2ee67f0e662f786741080d17c6f87b0 Signed-off-by: Laurent Delaigue <laurent.delaigue@obeo.fr>
-rw-r--r--plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/contentmergeviewer/text/EMFCompareTextMergeViewer.java18
1 files changed, 8 insertions, 10 deletions
diff --git a/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/contentmergeviewer/text/EMFCompareTextMergeViewer.java b/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/contentmergeviewer/text/EMFCompareTextMergeViewer.java
index 5783aa6cb..b70785b34 100644
--- a/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/contentmergeviewer/text/EMFCompareTextMergeViewer.java
+++ b/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/contentmergeviewer/text/EMFCompareTextMergeViewer.java
@@ -305,16 +305,14 @@ public class EMFCompareTextMergeViewer extends TextMergeViewer implements Comman
final Object oldInput = getInput();
if (event.getDocumentEvent() != null && oldInput instanceof CompareInputAdapter) {
// When we leave the current input
- if (oldInput instanceof CompareInputAdapter) {
- final AttributeChange diff = (AttributeChange)((CompareInputAdapter)oldInput)
- .getComparisonObject();
- final EAttribute eAttribute = diff.getAttribute();
- final Match match = diff.getMatch();
- final IEqualityHelper equalityHelper = match.getComparison().getEqualityHelper();
-
- updateModel(diff, eAttribute, equalityHelper, match.getLeft(), true);
- updateModel(diff, eAttribute, equalityHelper, match.getRight(), false);
- }
+ final AttributeChange diff = (AttributeChange)((CompareInputAdapter)oldInput)
+ .getComparisonObject();
+ final EAttribute eAttribute = diff.getAttribute();
+ final Match match = diff.getMatch();
+ final IEqualityHelper equalityHelper = match.getComparison().getEqualityHelper();
+
+ updateModel(diff, eAttribute, equalityHelper, match.getLeft(), true);
+ updateModel(diff, eAttribute, equalityHelper, match.getRight(), false);
}
}
});

Back to the top