aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/actions/Artifact.java
diff options
context:
space:
mode:
authorGravatar janakr <janakr@google.com>2018-01-19 22:29:42 -0800
committerGravatar Copybara-Service <copybara-piper@google.com>2018-01-19 22:31:37 -0800
commit192c8904999a3e4407999a12c85fc4e9114b5e97 (patch)
tree919af92bc875169391c9c843f9b4cbfdeef0b0db /src/main/java/com/google/devtools/build/lib/actions/Artifact.java
parentc193fc40c2f6f11e30d18cb6191b17810aeda9c5 (diff)
Start serializing ArtifactOwner: put in a simple codec for the null artifact owner and fix up BuildConfigurationValue.Key. ConfiguredTargetKey is going to need some modifications to AutoCodec: probably the long-awaited static "create" method.
PiperOrigin-RevId: 182630181
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/actions/Artifact.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/actions/Artifact.java15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/actions/Artifact.java b/src/main/java/com/google/devtools/build/lib/actions/Artifact.java
index eb9165a55c..e371ec1670 100644
--- a/src/main/java/com/google/devtools/build/lib/actions/Artifact.java
+++ b/src/main/java/com/google/devtools/build/lib/actions/Artifact.java
@@ -238,7 +238,7 @@ public class Artifact
*/
@VisibleForTesting
public Artifact(Path path, ArtifactRoot root, PathFragment execPath) {
- this(path, root, execPath, ArtifactOwner.NULL_OWNER);
+ this(path, root, execPath, ArtifactOwner.NullArtifactOwner.INSTANCE);
}
/**
@@ -251,7 +251,7 @@ public class Artifact
path,
root,
root.getExecPath().getRelative(root.getRoot().relativize(path)),
- ArtifactOwner.NULL_OWNER);
+ ArtifactOwner.NullArtifactOwner.INSTANCE);
}
/** Constructs a source or derived Artifact for the specified root-relative path and root. */
@@ -261,7 +261,7 @@ public class Artifact
root.getRoot().getRelative(rootRelativePath),
root,
root.getExecPath().getRelative(rootRelativePath),
- ArtifactOwner.NULL_OWNER);
+ ArtifactOwner.NullArtifactOwner.INSTANCE);
}
public final Path getPath() {
@@ -337,10 +337,11 @@ public class Artifact
/**
* Gets the {@code ActionLookupKey} of the {@code ConfiguredTarget} that owns this artifact, if it
- * was set. Otherwise, this should be a dummy value -- either {@link ArtifactOwner#NULL_OWNER} or
- * a dummy owner set in tests. Such a dummy value should only occur for source artifacts if
- * created without specifying the owner, or for special derived artifacts, such as target
- * completion middleman artifacts, build info artifacts, and the like.
+ * was set. Otherwise, this should be a dummy value -- either {@link
+ * ArtifactOwner.NullArtifactOwner#INSTANCE} or a dummy owner set in tests. Such a dummy value
+ * should only occur for source artifacts if created without specifying the owner, or for special
+ * derived artifacts, such as target completion middleman artifacts, build info artifacts, and the
+ * like.
*/
public final ArtifactOwner getArtifactOwner() {
return owner;