0 Replies Latest reply on Dec 21, 2006 9:28 AM by adrian.brock

    Proxy Object override methods

      I've fixed a problem whether the proxy factory wasn't implement equals/hashCode/toString
      properly when you used java.lang.Object as the parent.

      The changes can be most easily seen from the new methods in the ProxyTemplate code

       public boolean equals(Object obj)
       {
       if (delegate != null)
       {
       if (obj != null && obj instanceof Delegate)
       obj = ((Delegate) obj).getDelegate();
       return delegate.equals(obj);
       }
       else
       return super.equals(obj);
       }
      
       public int hashCode()
       {
       if (delegate != null)
       return delegate.hashCode();
       else
       return super.hashCode();
       }
      
       public String toString()
       {
       if (delegate != null)
       return delegate.toString();
       else
       return super.toString();
       }