summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Drossel2008-08-21 10:06:11 (EDT)
committerCarsten Drossel2008-08-21 10:06:11 (EDT)
commit7c48049f0c60d0f1f6c38b757a3e89ab3f5521f7 (patch)
tree0436ec3556c399fe8ad1eb1acc2ad4f0434b99c0
parent62c5240aff3f9be0fa8e2e4bc9e433fbc314bc7e (diff)
downloadorg.eclipse.riena-7c48049f0c60d0f1f6c38b757a3e89ab3f5521f7.zip
org.eclipse.riena-7c48049f0c60d0f1f6c38b757a3e89ab3f5521f7.tar.gz
org.eclipse.riena-7c48049f0c60d0f1f6c38b757a3e89ab3f5521f7.tar.bz2
fixed NavigationNodeId.equals() to ensure symmetry
-rw-r--r--org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/NavigationNodeId.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/NavigationNodeId.java b/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/NavigationNodeId.java
index e9e1e76..fd8e901 100644
--- a/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/NavigationNodeId.java
+++ b/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/NavigationNodeId.java
@@ -50,9 +50,11 @@ public class NavigationNodeId implements INavigationNodeId {
@Override
public boolean equals(Object other) {
if (other instanceof INavigationNodeId) {
+ if (!getClass().equals(other.getClass())) {
+ return false;
+ }
INavigationNodeId otherId = (INavigationNodeId) other;
- return equals(typeId, ((INavigationNodeId) other).getTypeId())
- && equals(instanceId, otherId.getInstanceId());
+ return equals(typeId, otherId.getTypeId()) && equals(instanceId, otherId.getInstanceId());
}
return false;
}