From 26f39d622a26be31fd810ba4489463174b4f12c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ryszard=20Wi=C5=9Bniewski?= Date: Mon, 30 Aug 2010 15:15:46 +0200 Subject: [PATCH] ResConfigFlags: optimized equals() and hashCode() implementations. --- src/brut/androlib/res/data/ResConfigFlags.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/brut/androlib/res/data/ResConfigFlags.java b/src/brut/androlib/res/data/ResConfigFlags.java index 2c481f87..f087d51e 100644 --- a/src/brut/androlib/res/data/ResConfigFlags.java +++ b/src/brut/androlib/res/data/ResConfigFlags.java @@ -274,16 +274,13 @@ public class ResConfigFlags { return false; } final ResConfigFlags other = (ResConfigFlags) obj; - if ((this.mQualifiers == null) ? (other.mQualifiers != null) : !this.mQualifiers.equals(other.mQualifiers)) { - return false; - } - return true; + return this.mQualifiers.equals(other.mQualifiers); } @Override public int hashCode() { int hash = 3; - hash = 97 * hash + (this.mQualifiers != null ? this.mQualifiers.hashCode() : 0); + hash = 97 * hash + this.mQualifiers.hashCode(); return hash; }