sebb        2004/02/21 13:59:38

  Modified:    src/core/org/apache/jmeter/testelement/property
                        TestElementProperty.java
  Log:
  Fix bug (recursive call in hashCode()) introduced just now and document equals method
  
  Revision  Changes    Path
  1.15      +10 -3     
jakarta-jmeter/src/core/org/apache/jmeter/testelement/property/TestElementProperty.java
  
  Index: TestElementProperty.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jmeter/src/core/org/apache/jmeter/testelement/property/TestElementProperty.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- TestElementProperty.java  21 Feb 2004 21:23:42 -0000      1.14
  +++ TestElementProperty.java  21 Feb 2004 21:59:37 -0000      1.15
  @@ -39,10 +39,17 @@
           super();
       }
   
  +    /**
  +     * Determines if two test elements are equal.
  +     * 
  +     * @return true if the value is not null and equals the other Objects value;
  +     * false otherwise (even if both values are null)
  +     */
       public boolean equals(Object o)
       {
           if (o instanceof TestElementProperty)
           {
  +             if (this == o) return true;
               if (value != null)
               {
                   return value.equals(((JMeterProperty) o).getObjectValue());
  @@ -52,7 +59,7 @@
       }
       public int hashCode()
        {
  -     return value == null ? 0 : hashCode();
  +     return value == null ? 0 : value.hashCode();
       }
   
       /* (non-Javadoc)
  
  
  

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

Reply via email to