diff options
author | janakr <janakr@google.com> | 2018-03-19 16:49:53 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-03-19 16:51:18 -0700 |
commit | c1dacd3683fe9184d299cbbe0bd9231ad6feb224 (patch) | |
tree | 6870bbbcd03d75d3cf7a64b57ee67670337a0546 /src/main/java/com/google/devtools/build/lib/collect | |
parent | 89216a350934987afb02963b331184b3b03c0439 (diff) |
Automated rollback of commit e6af9f9178e731a45e552b1d249ded90124945ba.
*** Reason for rollback ***
See linked bug.
*** Original change description ***
Add behavior to NestedSetCodec to prevent it from running during testing.
PiperOrigin-RevId: 189663863
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/NestedSetCodec.java | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/collect/nestedset/NestedSetCodec.java b/src/main/java/com/google/devtools/build/lib/collect/nestedset/NestedSetCodec.java index a4954ab740..255456139a 100644 --- a/src/main/java/com/google/devtools/build/lib/collect/nestedset/NestedSetCodec.java +++ b/src/main/java/com/google/devtools/build/lib/collect/nestedset/NestedSetCodec.java @@ -19,7 +19,6 @@ import com.google.common.hash.HashingOutputStream; import com.google.devtools.build.lib.skyframe.serialization.DeserializationContext; import com.google.devtools.build.lib.skyframe.serialization.EnumCodec; import com.google.devtools.build.lib.skyframe.serialization.ObjectCodec; -import com.google.devtools.build.lib.skyframe.serialization.SerializationConstants; import com.google.devtools.build.lib.skyframe.serialization.SerializationContext; import com.google.devtools.build.lib.skyframe.serialization.SerializationException; import com.google.protobuf.ByteString; @@ -55,11 +54,6 @@ public class NestedSetCodec<T> implements ObjectCodec<NestedSet<T>> { @Override public void serialize(SerializationContext context, NestedSet<T> obj, CodedOutputStream codedOut) throws SerializationException, IOException { - if (!SerializationConstants.shouldSerializeNestedSet) { - // Don't perform NestedSet serialization in testing - return; - } - // Topo sort the nested set to ensure digests are available for children at time of writing Collection<Object> topoSortedChildren = getTopologicallySortedChildren(obj); Map<Object, byte[]> childToDigest = new IdentityHashMap<>(); @@ -73,11 +67,6 @@ public class NestedSetCodec<T> implements ObjectCodec<NestedSet<T>> { @Override public NestedSet<T> deserialize(DeserializationContext context, CodedInputStream codedIn) throws SerializationException, IOException { - if (!SerializationConstants.shouldSerializeNestedSet) { - // Don't perform NestedSet deserialization in testing - return NestedSetBuilder.emptySet(Order.STABLE_ORDER); - } - Map<ByteString, Object> digestToChild = new HashMap<>(); int nestedSetCount = codedIn.readInt32(); Preconditions.checkState( |