diff options
author | Mark Spruiell <mes@zeroc.com> | 2006-01-11 22:20:47 +0000 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2006-01-11 22:20:47 +0000 |
commit | 9ce7664c50e5a3a7076b223fa9fafe11cc3d0fee (patch) | |
tree | da8e49c37aa6d2122b49ddde0ff7298e1b92b3ac /java/src/Ice/ProxyIdentityFacetKey.java | |
parent | file rtf.hdr was initially added on branch R3_0_branch. (diff) | |
download | ice-9ce7664c50e5a3a7076b223fa9fafe11cc3d0fee.tar.bz2 ice-9ce7664c50e5a3a7076b223fa9fafe11cc3d0fee.tar.xz ice-9ce7664c50e5a3a7076b223fa9fafe11cc3d0fee.zip |
fixing bug 732: equals() can raise ClassCastException
Diffstat (limited to 'java/src/Ice/ProxyIdentityFacetKey.java')
-rw-r--r-- | java/src/Ice/ProxyIdentityFacetKey.java | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/java/src/Ice/ProxyIdentityFacetKey.java b/java/src/Ice/ProxyIdentityFacetKey.java index 1d77df3b82b..18fd132ce53 100644 --- a/java/src/Ice/ProxyIdentityFacetKey.java +++ b/java/src/Ice/ProxyIdentityFacetKey.java @@ -40,8 +40,18 @@ public class ProxyIdentityFacetKey public boolean equals(java.lang.Object obj) { - ProxyIdentityFacetKey other = (ProxyIdentityFacetKey)obj; - return (_hashCode == other._hashCode) && _identity.equals(other._identity) && _facet.equals(other._facet); + if(this == obj) + { + return true; + } + + if(obj instanceof ProxyIdentityFacetKey) + { + ProxyIdentityFacetKey other = (ProxyIdentityFacetKey)obj; + return (_hashCode == other._hashCode) && _identity.equals(other._identity) && _facet.equals(other._facet); + } + + return false; } public Ice.ObjectPrx |