ode-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ODE-1074) Inconsistent method name
Date Fri, 04 May 2018 08:04:00 GMT

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

Hudson commented on ODE-1074:
-----------------------------

FAILURE: Integrated in Jenkins build ODE-trunk-jdk6 #897 (See [https://builds.apache.org/job/ODE-trunk-jdk6/897/])
ODE-1074:Change the method name "contains" to "find". (brucekuiliu: rev 3a06ad7f9c6c25d5e4021b5b52d2a7a59533d7b4)
* (edit) bpel-nobj/src/main/java/org/apache/ode/bpel/obj/migrate/DeepEqualityHelper.java


> 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)

Mime
View raw message