diff options
Diffstat (limited to 'ide_common')
3 files changed, 28 insertions, 9 deletions
diff --git a/ide_common/src/com/android/ide/common/resources/configuration/ScreenHeightQualifier.java b/ide_common/src/com/android/ide/common/resources/configuration/ScreenHeightQualifier.java index 2899631..5437f71 100644 --- a/ide_common/src/com/android/ide/common/resources/configuration/ScreenHeightQualifier.java +++ b/ide_common/src/com/android/ide/common/resources/configuration/ScreenHeightQualifier.java @@ -150,6 +150,7 @@ public final class ScreenHeightQualifier extends ResourceQualifier { return ""; //$NON-NLS-1$ } + @Override public int hashCode() { return mValue; @@ -157,13 +158,19 @@ public final class ScreenHeightQualifier extends ResourceQualifier { @Override public boolean equals(Object obj) { - if (this == obj) + if (this == obj) { return true; - if (getClass() != obj.getClass()) + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { return false; + } ScreenHeightQualifier other = (ScreenHeightQualifier) obj; - if (mValue != other.mValue) + if (mValue != other.mValue) { return false; + } return true; } } diff --git a/ide_common/src/com/android/ide/common/resources/configuration/ScreenWidthQualifier.java b/ide_common/src/com/android/ide/common/resources/configuration/ScreenWidthQualifier.java index 8748864..cf1e71a 100644 --- a/ide_common/src/com/android/ide/common/resources/configuration/ScreenWidthQualifier.java +++ b/ide_common/src/com/android/ide/common/resources/configuration/ScreenWidthQualifier.java @@ -157,13 +157,19 @@ public final class ScreenWidthQualifier extends ResourceQualifier { @Override public boolean equals(Object obj) { - if (this == obj) + if (this == obj) { return true; - if (getClass() != obj.getClass()) + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { return false; + } ScreenWidthQualifier other = (ScreenWidthQualifier) obj; - if (mValue != other.mValue) + if (mValue != other.mValue) { return false; + } return true; } } diff --git a/ide_common/src/com/android/ide/common/resources/configuration/SmallestScreenWidthQualifier.java b/ide_common/src/com/android/ide/common/resources/configuration/SmallestScreenWidthQualifier.java index e151805..2f82e79 100644 --- a/ide_common/src/com/android/ide/common/resources/configuration/SmallestScreenWidthQualifier.java +++ b/ide_common/src/com/android/ide/common/resources/configuration/SmallestScreenWidthQualifier.java @@ -157,13 +157,19 @@ public final class SmallestScreenWidthQualifier extends ResourceQualifier { @Override public boolean equals(Object obj) { - if (this == obj) + if (this == obj) { return true; - if (getClass() != obj.getClass()) + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { return false; + } SmallestScreenWidthQualifier other = (SmallestScreenWidthQualifier) obj; - if (mValue != other.mValue) + if (mValue != other.mValue) { return false; + } return true; } } |