[ 
https://issues.apache.org/jira/browse/OAK-562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13556070#comment-13556070
 ] 

Jukka Zitting commented on OAK-562:
-----------------------------------

bq. NPE

Ah, thanks! A mistake in the way I split up {{getOakName}} and 
{{getOakNameAllowNull}} in AbstractNamedTemplate. I'll fix that.

bq. ItemDefinitionTemplateImpl is not abstract

No particular reason. I'll change it to abstract.

BTW, there's still some duplicate conversion going on in registerNodeTypes, 
where the internal Oak names are first converted back to JCR names before being 
mapped again to Oak names. I should be able to refactor/simplify the code 
further so that the Oak names get used directly when registering node types.

                
> Clean up duplicate name conversion in plugins/nodetype
> ------------------------------------------------------
>
>                 Key: OAK-562
>                 URL: https://issues.apache.org/jira/browse/OAK-562
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: core
>            Reporter: angela
>         Attachments: 
> 0001-OAK-562-Clean-up-duplicate-name-conversion-in-plugin.patch, 
> 0001-OAK-562-Clean-up-duplicate-name-conversion-in-plugin.patch
>
>
> the following two lines are omnipresent in the node type package:
> JcrNameParser.checkName(name, true);
> this.name = mapper.getJcrName(mapper.getOakNameOrNull(name));
> as discussed in OAK-553 this is quite troublesome as getJcrName expects
> a null oak name parameter and in addition looks odd.
> possibles solutions include:
> - refactoring this to a new method in the NameMapper (getNormalizedJcrName)
> - refactor the code such that the node type related implementations
>   keep oak-names internally and convert them to the standard jcr-form
>   on demand.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to