Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,19 @@ public boolean rangesEqual(int thisIndex, IRangeComparator otherComparator, int
int olen= other.getTokenLength(otherIndex);
if (tlen == olen) {
String[] linesToCompare = extract(thisIndex, otherIndex, other, false);
return linesToCompare[0].equals(linesToCompare[1]);
String s1 = linesToCompare[0];
String s2 = linesToCompare[1];
if (s1.isEmpty() && s2.isEmpty()) {
return true;
}
if (s1.isEmpty() || s2.isEmpty()) {
return false;
}
if (s1.length() != s2.length() || s1.charAt(0) != s2.charAt(0)
|| s1.charAt(s1.length() - 1) != s2.charAt(s2.length() - 1)) {
return false;
}
return s1.equals(s2);
} else if (fCompareFilters != null && fCompareFilters.length > 0) {
String[] linesToCompare = extract(thisIndex, otherIndex, other, true);
return linesToCompare[0].equals(linesToCompare[1]);
Expand Down
Loading
Loading