Fixed indentation and simplified equals method as per code review comments on r419

This commit is contained in:
Inderjeet Singh 2009-08-18 18:07:25 +00:00
parent f4f596ec3d
commit c13fc568c7

View File

@ -351,13 +351,16 @@ public final class JsonPrimitive extends JsonElement {
@Override
public boolean equals(Object obj) {
if (this == obj) return true;
if (obj == null) return false;
if (getClass() != obj.getClass()) return false;
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
JsonPrimitive other = (JsonPrimitive)obj;
if (value == null) {
if (other.value != null) return false;
} else if (!value.equals(other.value)) return false;
return true;
return other.value == null;
}
return value.equals(other.value);
}
}