Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiraj Modi2019-10-14 06:31:30 -0400
committerNiraj Modi2019-10-14 06:31:30 -0400
commit94b7ed61702a6a09efb85038b33dd7edf9b2d9c7 (patch)
tree39f86c93a74af0afaf36eaef6e010a54dea29a0b /bundles
parent81250c5b05f940f4c79d3cd2354321c831929341 (diff)
downloadeclipse.platform.team-R4_6_maintenance.tar.gz
eclipse.platform.team-R4_6_maintenance.tar.xz
eclipse.platform.team-R4_6_maintenance.zip
Bug 531945 - Use of ICompareFilters causes inaccurate comparison offsetsR4_6_maintenance
Change-Id: Iadf625e3133122326e0ce99113ff378ff792d26d Signed-off-by: Niraj Modi <niraj.modi@in.ibm.com>
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/DocLineComparator.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/DocLineComparator.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/DocLineComparator.java
index c0a4e1abd..c225b1dc8 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/DocLineComparator.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/DocLineComparator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2013 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -168,12 +168,12 @@ public class DocLineComparator implements ITokenComparator {
int tlen= getTokenLength(thisIndex);
int olen= other.getTokenLength(otherIndex);
- if (fCompareFilters != null && fCompareFilters.length > 0) {
- String[] linesToCompare = extract(thisIndex, otherIndex, other, true);
- return linesToCompare[0].equals(linesToCompare[1]);
- } else if (tlen == olen) {
+ if (tlen == olen) {
String[] linesToCompare = extract(thisIndex, otherIndex, other, false);
return linesToCompare[0].equals(linesToCompare[1]);
+ } else if (fCompareFilters != null && fCompareFilters.length > 0) {
+ String[] linesToCompare = extract(thisIndex, otherIndex, other, true);
+ return linesToCompare[0].equals(linesToCompare[1]);
}
}
return false;

Back to the top