Use if-else

This commit is contained in:
Gary Gregory 2024-06-23 14:21:55 -04:00
parent 0e3f2d3de5
commit 1364973ff2
1 changed files with 5 additions and 7 deletions

View File

@ -195,14 +195,12 @@ public class SequencesComparator<T> {
script.append(new KeepCommand<>(sequence1.get(i)));
++i;
++j;
} else if (end1 - start1 > end2 - start2) {
script.append(new DeleteCommand<>(sequence1.get(i)));
++i;
} else {
if (end1 - start1 > end2 - start2) {
script.append(new DeleteCommand<>(sequence1.get(i)));
++i;
} else {
script.append(new InsertCommand<>(sequence2.get(j)));
++j;
}
script.append(new InsertCommand<>(sequence2.get(j)));
++j;
}
}