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 >
