aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com')
-rw-r--r--src/main/java/com/google/devtools/build/lib/skyframe/TransitiveTraversalValue.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/TransitiveTraversalValue.java b/src/main/java/com/google/devtools/build/lib/skyframe/TransitiveTraversalValue.java
index 829bc7d7f0..bed7220d11 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/TransitiveTraversalValue.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/TransitiveTraversalValue.java
@@ -13,6 +13,7 @@
// limitations under the License.
package com.google.devtools.build.lib.skyframe;
+import com.google.common.base.Preconditions;
import com.google.devtools.build.lib.concurrent.ThreadSafety.Immutable;
import com.google.devtools.build.lib.concurrent.ThreadSafety.ThreadSafe;
import com.google.devtools.build.lib.packages.NoSuchTargetException;
@@ -38,16 +39,16 @@ public class TransitiveTraversalValue implements SkyValue {
// Note that this value does not guarantee singleton-like reference equality for successful
// {@link TransitiveTraversalValue}s because we use Java deserialization. Java deserialization can
// create other instances.
- static final TransitiveTraversalValue SUCCESSFUL_TRANSITIVE_TRAVERSAL_VALUE =
+ public static final TransitiveTraversalValue SUCCESSFUL_TRANSITIVE_TRAVERSAL_VALUE =
new TransitiveTraversalValue(null);
- private TransitiveTraversalValue(@Nullable NoSuchTargetException errorLoadingTarget) {
- this.errorLoadingTarget = errorLoadingTarget;
+ public static TransitiveTraversalValue unsuccessfulTransitiveTraversal(
+ NoSuchTargetException errorLoadingTarget) {
+ return new TransitiveTraversalValue(Preconditions.checkNotNull(errorLoadingTarget));
}
- static TransitiveTraversalValue unsuccessfulTransitiveTraversal(
- NoSuchTargetException errorLoadingTarget) {
- return new TransitiveTraversalValue(errorLoadingTarget);
+ private TransitiveTraversalValue(@Nullable NoSuchTargetException errorLoadingTarget) {
+ this.errorLoadingTarget = errorLoadingTarget;
}
/** Returns the error, if any, from loading the target. */