You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stanbol.apache.org by "Minto van der Sluis (JIRA)" <ji...@apache.org> on 2013/02/13 13:52:14 UTC
[jira] [Commented] (STANBOL-928) Null list on RuleStore RecipeImpl
[ https://issues.apache.org/jira/browse/STANBOL-928?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13577531#comment-13577531 ]
Minto van der Sluis commented on STANBOL-928:
---------------------------------------------
On 13-2-2013 12:20, Reto Bachmann-Gmür wrote:
> Hi Minto
>
> I completely agree. I think its important to work on this "details" to
> make the Stanbol Java API more usable.
>
> Cheers,
> Reto
> Null list on RuleStore RecipeImpl
> ---------------------------------
>
> Key: STANBOL-928
> URL: https://issues.apache.org/jira/browse/STANBOL-928
> Project: Stanbol
> Issue Type: Bug
> Components: Rules
> Reporter: Minto van der Sluis
>
> Hi folks,
> Is there a specific reason why Recipe.getRuleList() can return null
> instead of an empty list?
> Looking at the code of RecipeImpl it seems to be inconsistent.
> a) getRuleList() returns null if there are no rules.
> public RuleList getRuleList() {
> return ruleList;
> }
> b) getRuleNames() and listRuleIDs() returns and empty list if there are
> no rules.
> @Override
> public List<UriRef> listRuleIDs() {
> if (ruleList != null && !ruleList.isEmpty()) {
> ...
> } else {
> return Collections.emptyList();
> }
> }
> Personally I prefer getRuleList() to also always return a possibly empty
> list.
> Regards,
> Minto
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira