summaryrefslogtreecommitdiff
path: root/java/src/Ice/ProxyIdentityKey.java
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2006-01-11 22:20:47 +0000
committerMark Spruiell <mes@zeroc.com>2006-01-11 22:20:47 +0000
commit9ce7664c50e5a3a7076b223fa9fafe11cc3d0fee (patch)
treeda8e49c37aa6d2122b49ddde0ff7298e1b92b3ac /java/src/Ice/ProxyIdentityKey.java
parentfile rtf.hdr was initially added on branch R3_0_branch. (diff)
downloadice-9ce7664c50e5a3a7076b223fa9fafe11cc3d0fee.tar.bz2
ice-9ce7664c50e5a3a7076b223fa9fafe11cc3d0fee.tar.xz
ice-9ce7664c50e5a3a7076b223fa9fafe11cc3d0fee.zip
fixing bug 732: equals() can raise ClassCastException
Diffstat (limited to 'java/src/Ice/ProxyIdentityKey.java')
-rw-r--r--java/src/Ice/ProxyIdentityKey.java14
1 files changed, 12 insertions, 2 deletions
diff --git a/java/src/Ice/ProxyIdentityKey.java b/java/src/Ice/ProxyIdentityKey.java
index 316bbefd7c1..e3e394091f9 100644
--- a/java/src/Ice/ProxyIdentityKey.java
+++ b/java/src/Ice/ProxyIdentityKey.java
@@ -37,8 +37,18 @@ public class ProxyIdentityKey
public boolean
equals(java.lang.Object obj)
{
- ProxyIdentityKey other = (ProxyIdentityKey)obj;
- return (_hashCode == other._hashCode) && _identity.equals(other._identity);
+ if(this == obj)
+ {
+ return true;
+ }
+
+ if(obj instanceof ProxyIdentityKey)
+ {
+ ProxyIdentityKey other = (ProxyIdentityKey)obj;
+ return (_hashCode == other._hashCode) && _identity.equals(other._identity);
+ }
+
+ return false;
}
public Ice.ObjectPrx