We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 81c71e4 commit 0d2b068Copy full SHA for 0d2b068
src/difflib/DeltaComparator.java
@@ -14,6 +14,13 @@ private DeltaComparator() {
14
}
15
16
public int compare(final Delta a, final Delta b) {
17
- return Integer.valueOf(a.getOriginal().getPosition()).compareTo(b.getOriginal().getPosition());
+ final int posA = a.getOriginal().getPosition();
18
+ final int posB = b.getOriginal().getPosition();
19
+ if (posA > posB) {
20
+ return 1;
21
+ } else if (posA < posB) {
22
+ return -1;
23
+ }
24
+ return 0;
25
26
0 commit comments