commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Colbert Philippe (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (LANG-809) Encapsulate trival equal test into a method to avoid repeating over and over.....
Date Sat, 16 Jun 2012 16:22:42 GMT

     [ https://issues.apache.org/jira/browse/LANG-809?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Colbert Philippe updated LANG-809:
----------------------------------

    Summary: Encapsulate trival equal test into a method to avoid repeating over and over.....
 (was: Encapsulate trival equal test into a method to avoir repeating over and over.....)
    
> Encapsulate trival equal test into a method to avoid 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
>              Labels: Encapsulate, EqualsBuilder, in, test, trivial
>
> 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

        

Mime
View raw message