Colbert Philippe created LANG-809:
-------------------------------------

             Summary: Encapsulate trival equal test into a method to avoir 
repeating over and over.....
                 Key: LANG-809
                 URL: https://issues.apache.org/jira/browse/LANG-809
             Project: Commons Lang
          Issue Type: Improvement
    Affects Versions: 3.1
         Environment: Windows 7
            Reporter: Colbert Philippe
            Priority: Minor


In class EqualsBuilder, the documentation gives sample code on how to use 
EqualsBuilder.  The proper usage of class EqualsBuilder is a bit long.  My 
suggestion is to encapsulate the following trivial test into a method inside 
the class EqualsBuilder.  You call it the new method trivalTest(Object obj1, 
Object obj2).

   // This is the code that should be put in a method to avoid repeating....
   if (obj == null) { return false; }
   if (obj == this) { return true; }
   if (obj.getClass() != getClass()) {
     return false;
   }


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to