[
https://issues.apache.org/jira/browse/OAK-562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13556055#comment-13556055
]
angela commented on OAK-562:
----------------------------
i like the patch and find the code much clearer now.
just 2 things that i came across:
- NPE when running the TCK: imo the setName method should not be defined
@Nonnull but
should check for null and throw ConstraintViolationException... currently
this is
only done later on in getOakNameOrThrowConstraintViolation (the NPE occurs
before)
- is there a particular reason that ItemDefinitionTemplateImpl is not abstract?
> 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