ECS: get rid of broken overlap check

This commit is contained in:
Jakub Valtar
2016-03-27 21:44:33 +02:00
parent 2da307c04f
commit 761a9aba86

View File

@@ -85,15 +85,7 @@ public class SourceMapping {
// Edits sorted by output offsets
Collections.sort(outEdits, OUTPUT_OFFSET_COMP);
// Check input edits for overlaps
for (int i = 0, lastEnd = 0; i < editCount; i++) {
Edit ch = inEdits.get(i);
if (ch.fromOffset < lastEnd) {
String error = "Edits overlap in input! " + inEdits.get(i - 1) + ", " + ch;
throw new IndexOutOfBoundsException(error);
}
lastEnd = ch.fromOffset + ch.fromLength;
}
// TODO: add some validation
// Input
ListIterator<Edit> inIt = inEdits.listIterator();