Created STANBOL-928 [1] and added a patch regards,
Minto [1] https://issues.apache.org/jira/browse/STANBOL-928 Op 13-2-2013 12:20, Reto Bachmann-Gmür schreef: > Hi Minto > > I completely agree. I think its important to work on this "details" to > make the Stanbol Java API more usable. > > Cheers, > Reto > > On Wed, Feb 13, 2013 at 12:02 PM, Minto van der Sluis <[email protected]> wrote: >> 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. >> >> I could create an issue for this and supply a patch. >> >> Regards, >> >> -- >> ir. ing. Minto van der Sluis >> Software innovator / renovator >> Xup BV >> > -- ir. ing. Minto van der Sluis Software innovator / renovator Xup BV Mobiel: +31 (0) 626 014541
