diff options
author | tomlu <tomlu@google.com> | 2018-04-18 08:41:55 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-04-18 08:43:14 -0700 |
commit | 641569af14f9f639291f153f78b3ba467d9309e5 (patch) | |
tree | f5e864ec1994892c6d12ccd39c967b800e2bf6e9 /src/test/java/com | |
parent | 380f5dd96e97ff9c1c8ceb1104322ba6e303e067 (diff) |
Clean up IterablesChain.
* Change builder return type to Iterable<T> instead of IterableChain<T>. It is over-specified and unnecessary to state the return type so precisely.
* Optimize builder for cases where we add 0 or 1 iterables to the chain. In this case, we can simply return the underlying iterables without adding wrappers.
* Extract DedupingIterable, it doesn't have anything to do with IterablesChain and is only used in one place
RELNOTES: None
PiperOrigin-RevId: 193363048
Diffstat (limited to 'src/test/java/com')
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/collect/CollectionUtilsTest.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/collect/CollectionUtilsTest.java b/src/test/java/com/google/devtools/build/lib/collect/CollectionUtilsTest.java index 9f8b3770a1..40d4db2cdd 100644 --- a/src/test/java/com/google/devtools/build/lib/collect/CollectionUtilsTest.java +++ b/src/test/java/com/google/devtools/build/lib/collect/CollectionUtilsTest.java @@ -64,7 +64,7 @@ public class CollectionUtilsTest { NestedSet<Integer> ns2 = NestedSetBuilder.<Integer>linkOrder().add(1).add(2).add(3).build(); assertThat(CollectionUtils.isImmutable(ns2)).isTrue(); - IterablesChain<Integer> chain = IterablesChain.<Integer>builder().addElement(1).build(); + Iterable<Integer> chain = IterablesChain.<Integer>builder().addElement(1).build(); assertThat(CollectionUtils.isImmutable(chain)).isTrue(); |