summaryrefslogtreecommitdiff
path: root/java/src/Ice/ProxyIdentityFacetKey.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/ProxyIdentityFacetKey.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/ProxyIdentityFacetKey.java')
-rw-r--r--java/src/Ice/ProxyIdentityFacetKey.java14
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