You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-dev@db.apache.org by to...@apache.org on 2004/06/11 00:44:07 UTC

cvs commit: db-ojb/src/java/org/apache/ojb/broker/core/proxy IndirectionHandlerDefaultImpl.java

tomdz       2004/06/10 15:44:07

  Modified:    src/java/org/apache/ojb/broker/core/proxy
                        IndirectionHandlerDefaultImpl.java
  Log:
  Removed special materialization treatment of hashCode()
  
  Revision  Changes    Path
  1.4       +10 -3     db-ojb/src/java/org/apache/ojb/broker/core/proxy/IndirectionHandlerDefaultImpl.java
  
  Index: IndirectionHandlerDefaultImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/core/proxy/IndirectionHandlerDefaultImpl.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- IndirectionHandlerDefaultImpl.java	12 Apr 2004 18:20:56 -0000	1.3
  +++ IndirectionHandlerDefaultImpl.java	10 Jun 2004 22:44:06 -0000	1.4
  @@ -281,12 +281,19 @@
   
           try
           {
  -            // The hashCode shouldn't change after materialization,
  -            // so we use the hashCode of the handler instead of the realSubject's one
  +            // [tomdz]
  +            // Previously the hashcode of the identity would have been used
  +            // but this requires a compatible hashcode implemenation in the
  +            // proxied object (which is somewhat unlikely)
  +            // for those that require this behavior, a custom indirection
  +            // handler can be used, or the System.identityHashCode(Object)
  +            // can be used on the identity
  +            /*
               if ("hashCode".equals(methodName))
               {
                   return new Integer(_id.hashCode());
               }
  +            */
   
               // [tomdz]
               // this would handle toString differently for non-materialized proxies
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org