Change private method to static to underline that it is not intended to use
reference to `this and its internal state.
RELNOTES:none
PiperOrigin-RevId: 193629392
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 22db91b..c8d5a05 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
@@ -356,10 +356,10 @@
* null pointer is not a valid label.
*/
public Node<T> createNode(T label) {
- return nodes.computeIfAbsent(label, this::createNodeNative);
+ return nodes.computeIfAbsent(label, Digraph::createNodeNative);
}
- private Node<T> createNodeNative(T label) {
+ private static <T> Node<T> createNodeNative(T label) {
Preconditions.checkNotNull(label);
return new Node<>(label);
}