peterreilly    2004/05/17 06:30:52

  Modified:    src/main/org/apache/tools/ant/taskdefs Tag: ANT_16_BRANCH
                        MacroDef.java
  Log:
  sync
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.7.2.18  +8 -15     ant/src/main/org/apache/tools/ant/taskdefs/MacroDef.java
  
  Index: MacroDef.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/MacroDef.java,v
  retrieving revision 1.7.2.17
  retrieving revision 1.7.2.18
  diff -u -r1.7.2.17 -r1.7.2.18
  --- MacroDef.java     9 Mar 2004 17:01:33 -0000       1.7.2.17
  +++ MacroDef.java     17 May 2004 13:30:51 -0000      1.7.2.18
  @@ -596,13 +596,17 @@
       }
   
       /**
  -     * equality method for macrodef, ignores project and
  +     * similar equality method for macrodef, ignores project and
        * runtime info.
        *
        * @param obj an <code>Object</code> value
        * @return a <code>boolean</code> value
        */
  -    public boolean equals(Object obj) {
  +    public boolean similar(Object obj) {
  +        if (obj == this) {
  +            return true;
  +        }
  +
           if (obj == null) {
               return false;
           }
  @@ -650,17 +654,6 @@
       }
   
       /**
  -     * @return a hash code value for this object.
  -     */
  -    public int hashCode() {
  -        return objectHashCode(name)
  -            + objectHashCode(getURI())
  -            + objectHashCode(nestedSequential)
  -            + objectHashCode(attributes)
  -            + objectHashCode(elements);
  -    }
  -
  -    /**
        * extends AntTypeDefinition, on create
        * of the object, the template macro definition
        * is given.
  @@ -704,7 +697,7 @@
                   return false;
               }
               MyAntTypeDefinition otherDef = (MyAntTypeDefinition) other;
  -            return macroDef.equals(otherDef.macroDef);
  +            return macroDef.similar(otherDef.macroDef);
           }
   
           /**
  @@ -720,7 +713,7 @@
                   return false;
               }
               MyAntTypeDefinition otherDef = (MyAntTypeDefinition) other;
  -            return macroDef.equals(otherDef.macroDef);
  +            return macroDef.similar(otherDef.macroDef);
           }
       }
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to