We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0781877 commit afcbb1dCopy full SHA for afcbb1d
src/main/java/difflib/patch/DeltaComparator.java
src/main/java/difflib/patch/Patch.java
@@ -20,6 +20,7 @@
20
package difflib.patch;
21
22
import java.util.Collections;
23
+import static java.util.Comparator.comparing;
24
import java.util.LinkedList;
25
import java.util.List;
26
import java.util.ListIterator;
@@ -81,7 +82,7 @@ public void addDelta(Delta<T> delta) {
81
82
* @return the deltas
83
*/
84
public List<Delta<T>> getDeltas() {
- Collections.sort(deltas, DeltaComparator.INSTANCE);
85
+ Collections.sort(deltas, comparing(d -> d.getOriginal().getPosition()));
86
return deltas;
87
}
88
0 commit comments