[ 
https://issues.apache.org/jira/browse/ODE-1074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16463517#comment-16463517
 ] 

ASF GitHub Bot commented on ODE-1074:
-------------------------------------

Github user asfgit closed the pull request at:

    https://github.com/apache/ode/pull/7


> Inconsistent method name
> ------------------------
>
>                 Key: ODE-1074
>                 URL: https://issues.apache.org/jira/browse/ODE-1074
>             Project: ODE
>          Issue Type: Improvement
>            Reporter: KuiLIU
>            Priority: Major
>
> The following method is named "contains" that seems to asking whether the 
> Collection c contains the object t1 or not, and the answer is true or false.
> Actually, the method tries to find an element in the Collection c with the 
> Object t1 and returns it.
> Thus, this method should be renamed "find" that would be more clear.
> {code:java}
>       private Object contains(Collection c, Object t1) {
>               Iterator itor = c.iterator();
>               Object t2;
>               logFalseThrough = true;
>               while (itor.hasNext()){
>                       t2 = itor.next();
>                       if (deepEquals(t1, t2)) {
>                               logFalseThrough = false;
>                               return t2;
>                       }
>               }
>               logFalseThrough = false;
>               return null;
>       }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to