Skip to content

Commit cb6d2fa

Browse files
committed
DebugUtils: use a lambda for comparator
1 parent 0889da2 commit cb6d2fa

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/main/java/org/scijava/util/DebugUtils.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
import java.lang.reflect.Modifier;
3737
import java.util.ArrayList;
3838
import java.util.Collections;
39-
import java.util.Comparator;
4039
import java.util.Map;
4140

4241
/**
@@ -105,13 +104,7 @@ public static String getStackDump() {
105104
// sort list of threads by name
106105
final ArrayList<Thread> threads =
107106
new ArrayList<>(stackTraces.keySet());
108-
Collections.sort(threads, new Comparator<Thread>() {
109-
110-
@Override
111-
public int compare(final Thread t1, final Thread t2) {
112-
return t1.getName().compareTo(t2.getName());
113-
}
114-
});
107+
Collections.sort(threads, (t1, t2) -> t1.getName().compareTo(t2.getName()));
115108

116109
for (final Thread t : threads) {
117110
dumpThread(t, stackTraces.get(t), sb);

0 commit comments

Comments
 (0)