Bug 531945 - Use of ICompareFilters causes inaccurate comparison offsets

Change-Id: I5608cb42222b3cf3aa04c3fb0b46d3c1dc818291
Signed-off-by: Niraj Modi <niraj.modi@in.ibm.com>
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 d1ce02c..7eaeaa8 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, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
  *
  * This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
@@ -175,12 +175,12 @@
 
 			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;