Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 54f0a24

Browse filesBrowse files
author
shotwave
committed
redundant sorting remooved
1 parent cf81616 commit 54f0a24
Copy full SHA for 54f0a24

File tree

Expand file treeCollapse file tree

1 file changed

+0
-8
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+0
-8
lines changed

‎src/difflib/DiffUtils.java

Copy file name to clipboardExpand all lines: src/difflib/DiffUtils.java
-8Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
import difflib.myers.MyersDiff;
1919

2020
import java.util.ArrayList;
21-
import java.util.Collections;
22-
import java.util.Comparator;
2321
import java.util.List;
2422
import java.util.regex.Matcher;
2523
import java.util.regex.Pattern;
@@ -189,13 +187,7 @@ public static List<String> generateUnifiedDiff(String original, String revised,
189187
ret.add("+++ " + revised);
190188

191189
if (!patch.getDeltas().isEmpty()) {
192-
// Hmm, I thought the Deltas were sorted already... turns out they're not.
193190
List<Delta> patchDeltas = new ArrayList<Delta>(patch.getDeltas());
194-
Collections.sort(patchDeltas, new Comparator<Delta>() {
195-
public int compare(Delta a, Delta b) {
196-
return new Integer(a.getOriginal().getPosition()).compareTo(b.getOriginal().getPosition());
197-
}
198-
});
199191

200192
// code outside the if block also works for single-delta issues.
201193
List<Delta> deltas = new ArrayList<Delta>(); // current list of Delta's to process

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.