Skip to content

Commit

Permalink
Use if-else
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Jun 23, 2024
1 parent 0e3f2d3 commit 1364973
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -195,14 +195,12 @@ private void buildScript(final int start1, final int end1, final int start2, fin
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;
}
}

Expand Down

0 comments on commit 1364973

Please sign in to comment.