You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by ja...@apache.org on 2003/11/20 10:15:29 UTC

cvs commit: incubator-geronimo/modules/core/src/java/org/apache/geronimo/core/service AbstractManagedComponent.java

janb        2003/11/20 01:15:29

  Modified:    modules/core/src/java/org/apache/geronimo/core/service
                        AbstractManagedComponent.java
  Log:
  Removed incorrect override of equals() and hashCode() methods. Causes problems with registering and unregistering for jmx notifications.
  
  Revision  Changes    Path
  1.2       +1 -32     incubator-geronimo/modules/core/src/java/org/apache/geronimo/core/service/AbstractManagedComponent.java
  
  Index: AbstractManagedComponent.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/core/src/java/org/apache/geronimo/core/service/AbstractManagedComponent.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AbstractManagedComponent.java	30 Oct 2003 07:47:04 -0000	1.1
  +++ AbstractManagedComponent.java	20 Nov 2003 09:15:29 -0000	1.2
  @@ -119,35 +119,4 @@
   
   
     
  -
  -
  -
  -    /**
  -     * Two Components are equal if they have the same name;
  -     *
  -     * @param component to test
  -     * @return true if the names are the same, false otherwise
  -     */
  -    public boolean equals(Object o) {
  -        if (o instanceof AbstractManagedComponent) {
  -            AbstractManagedComponent component = (AbstractManagedComponent)o;
  -            return component.getObjectName().equals(objectName);
  -        }
  -        return false;
  -    }
  -
  -
  -    /**
  -     * Get a hash value for this Component.
  -     * This is the hash of the unique name of
  -     * the Component.
  -     *
  -     * @return hash of Component name
  -     */
  -    public int hashCode() {
  -        if (objectName == null) {
  -            return 0;
  -        }
  -        return objectName.toString().hashCode();
  -    }
   }