From f847d47daa13243f0cdb1397fa32d4ae0287aa1d Mon Sep 17 00:00:00 2001 From: Eric Cochran Date: Wed, 4 Oct 2017 15:54:17 -0700 Subject: [PATCH] Remove Types.equal. (#358) Nobody uses this helper method. --- moshi/src/main/java/com/squareup/moshi/Types.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/moshi/src/main/java/com/squareup/moshi/Types.java b/moshi/src/main/java/com/squareup/moshi/Types.java index c0794a1..3972d66 100644 --- a/moshi/src/main/java/com/squareup/moshi/Types.java +++ b/moshi/src/main/java/com/squareup/moshi/Types.java @@ -202,10 +202,6 @@ public final class Types { }); } - static boolean equal(@Nullable Object a, @Nullable Object b) { - return a == b || (a != null && a.equals(b)); - } - /** Returns true if {@code a} and {@code b} are equal. */ public static boolean equals(@Nullable Type a, @Nullable Type b) { if (a == b) { @@ -228,7 +224,7 @@ public final class Types { Type[] bTypeArguments = pb instanceof ParameterizedTypeImpl ? ((ParameterizedTypeImpl) pb).typeArguments : pb.getActualTypeArguments(); - return equal(pa.getOwnerType(), pb.getOwnerType()) + return equals(pa.getOwnerType(), pb.getOwnerType()) && pa.getRawType().equals(pb.getRawType()) && Arrays.equals(aTypeArguments, bTypeArguments);