aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/syntax/EvalUtils.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/syntax/EvalUtils.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/syntax/EvalUtils.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/syntax/EvalUtils.java b/src/main/java/com/google/devtools/build/lib/syntax/EvalUtils.java
index a0f2e5b52a..e63b850f69 100644
--- a/src/main/java/com/google/devtools/build/lib/syntax/EvalUtils.java
+++ b/src/main/java/com/google/devtools/build/lib/syntax/EvalUtils.java
@@ -28,7 +28,6 @@ import com.google.devtools.build.lib.vfs.PathFragment;
import net.bytebuddy.implementation.bytecode.StackManipulation;
import java.util.Collection;
-import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -57,7 +56,7 @@ public final class EvalUtils {
* <p> It may throw an unchecked exception ComparisonException that should be wrapped in
* an EvalException.
*/
- public static final Comparator<Object> SKYLARK_COMPARATOR = new Comparator<Object>() {
+ public static final Ordering<Object> SKYLARK_COMPARATOR = new Ordering<Object>() {
private int compareLists(SkylarkList o1, SkylarkList o2) {
for (int i = 0; i < Math.min(o1.size(), o2.size()); i++) {
int cmp = compare(o1.get(i), o2.get(i));
@@ -390,7 +389,7 @@ public final class EvalUtils {
// For dictionaries we iterate through the keys only
// For determinism, we sort the keys.
try {
- return Ordering.from(SKYLARK_COMPARATOR).sortedCopy(dict.keySet());
+ return SKYLARK_COMPARATOR.sortedCopy(dict.keySet());
} catch (ComparisonException e) {
throw new EvalException(loc, e);
}