Restore addAll(NestedSet).
This still serves a purpose as it prohibits calls when the reference type is NestedSet.
RELNOTES: None.
@@ -21,6 +21,7 @@ import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Iterables;
import com.google.common.collect.MapMaker;
import com.google.devtools.build.lib.collect.compacthashset.CompactHashSet;
+import com.google.errorprone.annotations.DoNotCall;
import java.util.concurrent.ConcurrentMap;
/**
@@ -110,6 +111,13 @@ public final class NestedSetBuilder<E> {
return this;
}
+ /** @deprecated Use {@link #addTransitive} to avoid excessive memory use. */
+ @Deprecated
+ @DoNotCall
+ public NestedSetBuilder<E> addAll(NestedSet<? extends E> elements) {
+ throw new UnsupportedOperationException();
+ }
+
/**
* Adds a nested set as a transitive member to the set to be built.
*
