djencks     2005/10/23 20:50:51

  Modified:    modules/core/src/java/org/openejb/proxy
                        CglibEJBProxyFactory.java
  Log:

  GERONIMO-1104.  Fix equals/hashcode for callback filter
  
  Revision  Changes    Path
  1.4       +25 -2     
openejb/modules/core/src/java/org/openejb/proxy/CglibEJBProxyFactory.java
  
  Index: CglibEJBProxyFactory.java
  ===================================================================
  RCS file: 
/home/projects/openejb/scm/openejb/modules/core/src/java/org/openejb/proxy/CglibEJBProxyFactory.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- CglibEJBProxyFactory.java 16 Apr 2004 02:34:06 -0000      1.3
  +++ CglibEJBProxyFactory.java 24 Oct 2005 00:50:51 -0000      1.4
  @@ -72,7 +72,7 @@
           this(superClass, new Class[]{clientInterface}, classLoader);
       }
   
  -    
  +
       public CglibEJBProxyFactory(Class superClass, Class[] clientInterfaces, 
ClassLoader classLoader) {
           assert superClass != null && !superClass.isInterface();
           assert clientInterfaces != null;
  @@ -136,6 +136,29 @@
                   return 1;
               }
           }
  +
  +        public boolean equals(Object other) {
  +            if (other == null) {
  +                return false;
  +            }
  +            if (other == this) {
  +                return true;
  +            }
  +
  +            NoOverrideCallbackFilter otherFilter = null;
  +            if (other instanceof NoOverrideCallbackFilter) {
  +                otherFilter = (NoOverrideCallbackFilter) other;
  +            } else {
  +                return false;
  +            }
  +
  +            return superClass.equals(otherFilter.superClass);
  +        }
  +
  +        public int hashCode() {
  +            return superClass.hashCode();
  +        }
  +         
       }
   }
   
  
  
  

Reply via email to