Skip to content

Commit

Permalink
Apply the change to `android/guava/src/com/google/common/collect/Maps…
Browse files Browse the repository at this point in the history
….java` as well
  • Loading branch information
oksana-evs committed Jul 17, 2023
1 parent 51ec4e9 commit 6c47dd6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion android/guava/src/com/google/common/collect/Maps.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import com.google.common.base.Preconditions;
import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
import com.google.common.collect.Collections2.FilteredCollection;
import com.google.common.collect.MapDifference.ValueDifference;
import com.google.common.primitives.Ints;
import com.google.errorprone.annotations.CanIgnoreReturnValue;
Expand Down Expand Up @@ -1247,7 +1248,8 @@ public static <K, V> ImmutableMap<K, V> toMap(
@CanIgnoreReturnValue
public static <K, V> ImmutableMap<K, V> uniqueIndex(
Iterable<V> values, Function<? super V, K> keyFunction) {
if (values instanceof Collection) {
if (values instanceof Collection
&& !(values instanceof FilteredCollection || values instanceof FilteredMultimapValues)) {
return uniqueIndex(
values.iterator(),
keyFunction,
Expand Down

0 comments on commit 6c47dd6

Please sign in to comment.