Skip to content

Commit

Permalink
Remove workaround for [ancient Android unmodifiableMap bug](https:/…
Browse files Browse the repository at this point in the history
  • Loading branch information
cpovirk authored and Google Java Core Libraries committed Jun 10, 2024
1 parent e0e44b5 commit c2bbd73
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

import com.google.common.annotations.GwtCompatible;
import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.Iterators;
import com.google.common.collect.LinkedHashMultiset;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
Expand Down Expand Up @@ -120,9 +119,7 @@ public static void assertIteratorsInOrder(
siblingCollection.add(sampleElement);

Collection<E> copy = new ArrayList<>();
// Avoid copy.addAll(collection), which runs afoul of an Android bug in older versions:
// http://b.android.com/72073 http://r.android.com/98929
Iterators.addAll(copy, collection.iterator());
copy.addAll(collection);

try {
collection.add(sampleElement);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

import com.google.common.annotations.GwtCompatible;
import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.Iterators;
import com.google.common.collect.LinkedHashMultiset;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
Expand Down Expand Up @@ -120,9 +119,7 @@ public static void assertIteratorsInOrder(
siblingCollection.add(sampleElement);

Collection<E> copy = new ArrayList<>();
// Avoid copy.addAll(collection), which runs afoul of an Android bug in older versions:
// http://b.android.com/72073 http://r.android.com/98929
Iterators.addAll(copy, collection.iterator());
copy.addAll(collection);

try {
collection.add(sampleElement);
Expand Down

0 comments on commit c2bbd73

Please sign in to comment.