aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/collect
diff options
context:
space:
mode:
authorGravatar janakr <janakr@google.com>2018-06-08 12:51:58 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-06-08 12:53:15 -0700
commit45b308a62f42c2c0bcfe79dcd4046c4025a31059 (patch)
tree176fc0a10fa37906864e952d833966298ccab727 /src/main/java/com/google/devtools/build/lib/collect
parentc44a87b0736c671e07e62f8b09c8e61775543ded (diff)
Make Artifact#equals take the owner into account for derived artifacts.
Derived artifacts' owners are important because they are used to determine the artifact's generating action. Source artifacts' owners are not used in this way, so I left them alone. This allows us to get rid of most uses of ArtifactSkyKey. We may be able to delete it entirely in a follow-up. PiperOrigin-RevId: 199836436
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/collect')
-rw-r--r--src/main/java/com/google/devtools/build/lib/collect/nestedset/NestedSetCodecWithStore.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/collect/nestedset/NestedSetCodecWithStore.java b/src/main/java/com/google/devtools/build/lib/collect/nestedset/NestedSetCodecWithStore.java
index 430c3731c7..081fd674f8 100644
--- a/src/main/java/com/google/devtools/build/lib/collect/nestedset/NestedSetCodecWithStore.java
+++ b/src/main/java/com/google/devtools/build/lib/collect/nestedset/NestedSetCodecWithStore.java
@@ -133,8 +133,7 @@ public class NestedSetCodecWithStore<T> implements ObjectCodec<NestedSet<T>> {
* NestedSet#children}. When that field is an Object[], this is just identity hash code and
* reference equality, but when it is something else (like an Artifact), we will do an actual
* equality comparison. This may make some singleton NestedSets reference-equal where they were
- * not before. This should be ok, but isn't because Artifact does not properly implement equality
- * (it ignores the ArtifactOwner).
+ * not before. This should be ok as long as the contained object properly implements equality.
*
* <p>TODO(janakr): Fix this bug.
*/