3 Replies Latest reply on Apr 24, 2003 4:57 PM by gsinohio

    JBoss 3.2.0 says must override equals()

    gsinohio Newbie

      I'm deploying a BMP EJB to JBoss 3.2.0 and it says I must overried equals() and hashcode(). But take a look at the code, I am...


      /**
      * Returns true if both keys are equal.
      */
      public boolean equals(java.lang.Object otherKey)
      {
      if (otherKey instanceof com.mtdproducts.crm.ejb.customer.customerEntity.CustomerEntityKey)
      {
      com.mtdproducts.crm.ejb.customer.customerEntity.CustomerEntityKey o = (com.mtdproducts.crm.ejb.customer.customerEntity.CustomerEntityKey)otherKey;
      return (super.equals(otherKey));
      }
      return false;
      }

      /**
      * Returns the hash code for the key.
      */
      public int hashCode() {
      return (super.hashCode());
      }

      Any ideas?