aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/graph
diff options
context:
space:
mode:
authorGravatar brandjon <brandjon@google.com>2017-07-11 22:06:22 +0200
committerGravatar László Csomor <laszlocsomor@google.com>2017-07-12 08:50:03 +0200
commited249612955ea24b459425204642022da9936fb3 (patch)
tree6c7e9f048c742113514497f803c33d52905667c3 /src/main/java/com/google/devtools/build/lib/graph
parent3b038b9f7657f2d4c77700964ca06d92b3a6db12 (diff)
Remove Java 7 type inference workarounds and TODOs
Found by searching for TODOs mentioning "Java 7". There are plenty of other instances where we can simplify, but I don't want to be responsible for a large blast radius. At least in these cases we're fixing outdated comments. RELNOTES: None PiperOrigin-RevId: 161570189
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/graph')
-rw-r--r--src/main/java/com/google/devtools/build/lib/graph/Digraph.java4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/graph/Digraph.java b/src/main/java/com/google/devtools/build/lib/graph/Digraph.java
index b6d913f2b1..33842634b9 100644
--- a/src/main/java/com/google/devtools/build/lib/graph/Digraph.java
+++ b/src/main/java/com/google/devtools/build/lib/graph/Digraph.java
@@ -1049,9 +1049,7 @@ public final class Digraph<T> implements Cloneable {
return unordered;
}
List<Node<T>> result = new ArrayList<>(unordered);
- // Do not inline this variable: a workaround for Java 7 type inference.
- Comparator<Node<T>> nodeComparator = makeNodeComparator(comparator);
- Collections.sort(result, nodeComparator);
+ Collections.sort(result, makeNodeComparator(comparator));
return result;
}