[ 
https://issues.apache.org/jira/browse/JCR-1967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12671874#action_12671874
 ] 

Stefan Guggisberg commented on JCR-1967:
----------------------------------------

FWIW: 

i guess the code in question is based on the node type implementation in core.

i remember that i added the redundant call to name.equalsI() as an optimization.
some extensive profiling sessions (a long time ago) showed that 
EffectiveNodeType#includesNodeType() is somewhat expensive as it creates a 
number of objetcs, thus keeping the gc busy.  

> Impossible comparison in NodeTypeImpl
> -------------------------------------
>
>                 Key: JCR-1967
>                 URL: https://issues.apache.org/jira/browse/JCR-1967
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-jcr2spi
>    Affects Versions: 1.6.0
>            Reporter: Dave Brosius
>            Assignee: angela
>            Priority: Trivial
>             Fix For: 1.6.0
>
>
> org.apache.jackrabbit.jcr2spi.nodetype.NodeTypeImpl does
>     public boolean isNodeType(Name nodeTypeName) {
>         return getName().equals(nodeTypeName) ||  
> ent.includesNodeType(nodeTypeName);
>     }
> as getName() is a string and nodeTypeName is a Name this will always be 
> false. Perhaps you meant
>     public boolean isNodeType(Name nodeTypeName) {
>         return getName().equals(nodeTypeName.getLocalName()) ||  
> ent.includesNodeType(nodeTypeName);
>     }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to