Skip to content

Commit 69b8f5a

Browse files
committed
Use Comparators.lexicographical instead of Ordering.from in DeclaredMembers
1 parent d83f677 commit 69b8f5a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

core/src/com/google/inject/internal/DeclaredMembers.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616
package com.google.inject.internal;
1717

18-
import com.google.common.collect.Ordering;
18+
import com.google.common.collect.Comparators;
1919
import java.lang.reflect.Field;
2020
import java.lang.reflect.Method;
2121
import java.util.Arrays;
@@ -50,10 +50,10 @@ public static Method[] getDeclaredMethods(Class<?> type) {
5050
Comparator.comparing(Method::getName)
5151
.thenComparing(Method::getReturnType, Comparator.comparing(Class::getName))
5252
.thenComparing(
53-
method -> Arrays.asList(method.getParameterTypes()),
54-
// TODO: use Comparators.lexicographical when it's not @Beta.
55-
Ordering.<Class<?>>from(Comparator.comparing(Class::getName))
56-
.lexicographical()))
53+
method -> Arrays.asList(method.getParameterTypes()),
54+
Comparators.lexicographical(Comparator.comparing(Class::getName))
55+
)
56+
)
5757
.toArray(Method[]::new);
5858
}
5959
}

0 commit comments

Comments
 (0)