jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (JCR-1308) Unnecessary null check in EffectiveNodeType.getApplicableChildNodeDef()
Date Tue, 02 Sep 2008 17:23:44 GMT

     [ 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.


Mime
View raw message