summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/com')
-rw-r--r--src/com/isode/stroke/jid/JID.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/com/isode/stroke/jid/JID.java b/src/com/isode/stroke/jid/JID.java
index acd1430..490a65d 100644
--- a/src/com/isode/stroke/jid/JID.java
+++ b/src/com/isode/stroke/jid/JID.java
@@ -218,13 +218,13 @@ public class JID implements Comparable<JID> {
}
@Override
- public boolean equals(final Object otherObject) {
- if (otherObject == null || getClass() != otherObject.getClass()) {
- return false;
- }
+ public boolean equals(final Object otherObject) {
if (otherObject == this) {
return true;
}
+ if (!(otherObject instanceof JID)) {
+ return false;
+ }
JID other = (JID)otherObject;
String node1 = getNode();
String node2 = other.getNode();