aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/util
diff options
context:
space:
mode:
authorGravatar Nathan Harmata <nharmata@google.com>2015-02-10 01:50:12 +0000
committerGravatar Han-Wen Nienhuys <hanwen@google.com>2015-02-10 01:50:12 +0000
commit802c8861ac309e9cdb5ad357ff79a366e5890d96 (patch)
treebf4e505141be44183736656e1fc9f9f284cda3aa /src/main/java/com/google/devtools/build/lib/util
parent5c90ad2e80d7a1dc56dafb7aaa5ce1adedc79b7e (diff)
Mark some skyframe-internal data structures as being Serializable.
-- MOS_MIGRATED_REVID=85945243
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/util')
-rw-r--r--src/main/java/com/google/devtools/build/lib/util/GroupedList.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/util/GroupedList.java b/src/main/java/com/google/devtools/build/lib/util/GroupedList.java
index 2bf956df4c..43f6ff2cc6 100644
--- a/src/main/java/com/google/devtools/build/lib/util/GroupedList.java
+++ b/src/main/java/com/google/devtools/build/lib/util/GroupedList.java
@@ -20,6 +20,7 @@ import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Iterables;
import com.google.devtools.build.lib.collect.CompactHashSet;
+import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
@@ -35,7 +36,7 @@ import java.util.Set;
* <p>Despite the "list" name, it is an error for the same element to appear multiple times in the
* list. Users are responsible for not trying to add the same element to a GroupedList twice.
*/
-public class GroupedList<T> implements Iterable<Iterable<T>> {
+public class GroupedList<T> implements Iterable<Iterable<T>>, Serializable {
// Total number of items in the list. At least elements.size(), but might be larger if there are
// any nested lists.
private int size = 0;
@@ -84,7 +85,7 @@ public class GroupedList<T> implements Iterable<Iterable<T>> {
return elements.isEmpty();
}
- private static final Object EMPTY_LIST = new Object();
+ private static final Object EMPTY_LIST = new Serializable() {};
public Object compress() {
switch (size()) {