You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stanbol.apache.org by "KuiLIU (JIRA)" <ji...@apache.org> on 2018/04/19 08:53:00 UTC
[jira] [Created] (STANBOL-1469) Inconsistent method name
KuiLIU created STANBOL-1469:
-------------------------------
Summary: Inconsistent method name
Key: STANBOL-1469
URL: https://issues.apache.org/jira/browse/STANBOL-1469
Project: Stanbol
Issue Type: Improvement
Reporter: KuiLIU
Attachments: rename-methods.patch
The following method is name "select" which seems inconsistent with the method body code.
"select" is prone to an action of selecting something.
But the method is checking whether the status of the parameter "collection" is specified or not, which is a query.
So, the name "isSelected" should be more clear than "select" to describe the method.
{code:java}
public boolean select(Collection collection) {
for (String feature : features) {
Status status = FeaturesHelper.getFeatureStatus(collection, feature);
if (status == Status.SPECIFIED)
return true;
}
return false;
}
{code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)