diff options
author | Niraj Modi | 2019-10-11 01:08:23 +0000 |
---|---|---|
committer | Dani Megert | 2019-10-11 14:23:09 +0000 |
commit | 8c86157a414ac49f969763b050396c43ced40a1e (patch) | |
tree | d2668fd907e383300cbae64ee8e2dc5a62694947 /bundles | |
parent | 17002c7e175bd394dd73c7f9e8680e2228a4d2b9 (diff) | |
download | eclipse.platform.team-8c86157a414ac49f969763b050396c43ced40a1e.tar.gz eclipse.platform.team-8c86157a414ac49f969763b050396c43ced40a1e.tar.xz eclipse.platform.team-8c86157a414ac49f969763b050396c43ced40a1e.zip |
Bug 531945 - Use of ICompareFilters causes inaccurate comparison offsetsI20191024-1800I20191023-1810I20191022-1800I20191022-0405I20191020-1800I20191019-1800I20191018-1800I20191018-0720I20191016-1800I20191015-1800I20191014-1800I20191013-1800I20191012-1800I20191011-1800
Change-Id: I5608cb42222b3cf3aa04c3fb0b46d3c1dc818291
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.java | 10 |
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 d1ce02c0b..7eaeaa8b0 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 @@ 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; |