Skip to content

Commit

Permalink
Remove duplicate TypesWithUndefinedEquality#SPARSE_ARRAY entry
Browse files Browse the repository at this point in the history
Type `androidx.collection.SparseArrayCompat` was listed twice.

While there, sort the enum elements and type names.

Fixes #3110

COPYBARA_INTEGRATE_REVIEW=#3110 from PicnicSupermarket:rossendrijver/object_undefined_equality c697984
PiperOrigin-RevId: 442635974
  • Loading branch information
rickie authored and Error Prone Team committed Apr 18, 2022
1 parent 8bee38e commit f35b9df
Showing 1 changed file with 12 additions and 14 deletions.
Expand Up @@ -24,25 +24,23 @@

/** Enumerates types which have poorly-defined behaviour for equals. */
public enum TypesWithUndefinedEquality {
// keep-sorted start
CHAR_SEQUENCE("CharSequence", "java.lang.CharSequence"),
COLLECTION("Collection", "java.util.Collection"),
DATE("Date", "java.util.Date"),
IMMUTABLE_COLLECTION("ImmutableCollection", "com.google.common.collect.ImmutableCollection"),
IMMUTABLE_MULTIMAP("ImmutableMultimap", "com.google.common.collect.ImmutableMultimap"),
ITERABLE("Iterable", "com.google.common.collect.FluentIterable", "java.lang.Iterable"),
LONG_SPARSE_ARRAY(
"LongSparseArray",
"android.util.LongSparseArray",
"android.support.v4.util.LongSparseArrayCompat",
"androidx.core.util.LongSparseArrayCompat",
"androidx.collection.LongSparseArrayCompat"),
SPARSE_ARRAY(
"SparseArray",
"android.util.SparseArray",
"androidx.collection.SparseArrayCompat",
"androidx.collection.SparseArrayCompat"),
"android.util.LongSparseArray",
"androidx.collection.LongSparseArrayCompat",
"androidx.core.util.LongSparseArrayCompat"),
MULTIMAP("Multimap", "com.google.common.collect.Multimap"),
IMMUTABLE_MULTIMAP("ImmutableMultimap", "com.google.common.collect.ImmutableMultimap"),
CHAR_SEQUENCE("CharSequence", "java.lang.CharSequence"),
ITERABLE("Iterable", "java.lang.Iterable", "com.google.common.collect.FluentIterable"),
COLLECTION("Collection", "java.util.Collection"),
IMMUTABLE_COLLECTION("ImmutableCollection", "com.google.common.collect.ImmutableCollection"),
QUEUE("Queue", "java.util.Queue"),
DATE("Date", "java.util.Date");
SPARSE_ARRAY("SparseArray", "android.util.SparseArray", "androidx.collection.SparseArrayCompat");
// keep-sorted end

private final String shortName;
private final ImmutableSet<String> typeNames;
Expand Down

0 comments on commit f35b9df

Please sign in to comment.