Description
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