You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Jukka Zitting (JIRA)" <ji...@apache.org> on 2008/09/02 19:23:44 UTC
[jira] Resolved: (JCR-1308) Unnecessary null check in
EffectiveNodeType.getApplicableChildNodeDef()
[ https://issues.apache.org/jira/browse/JCR-1308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jukka Zitting resolved JCR-1308.
--------------------------------
Resolution: Fixed
Fix Version/s: 1.5
Assignee: Jukka Zitting
Fixed as suggested in revision 691324. Thanks!
> Unnecessary null check in EffectiveNodeType.getApplicableChildNodeDef()
> -----------------------------------------------------------------------
>
> Key: JCR-1308
> URL: https://issues.apache.org/jira/browse/JCR-1308
> Project: Jackrabbit
> Issue Type: Improvement
> Components: jackrabbit-core
> Affects Versions: 1.4
> Reporter: Ed Burnette
> Assignee: Jukka Zitting
> Priority: Trivial
> Fix For: 1.5
>
>
> This is just a trivial thing I noticed this while inspecting the code. getApplicableChildNodeDef() says:
> // try named node definitions first
> ItemDef[] defs = getNamedItemDefs(name);
> if (defs != null) {
> but getNamedItemDefs() is currently defined to not return null:
> public ItemDef[] getNamedItemDefs(Name name) {
> List defs = (List) namedItemDefs.get(name);
> if (defs == null || defs.size() == 0) {
> return ItemDef.EMPTY_ARRAY;
> }
> return (ItemDef[]) defs.toArray(new ItemDef[defs.size()]);
> }
> I didn't check to see if there were any other unnecessary null checks.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.