You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "angela (JIRA)" <ji...@apache.org> on 2013/01/11 18:36:12 UTC

[jira] [Updated] (OAK-554) PropertyStates#createProperty ignores namespace mappings when creating states of type NAME and PATH

     [ https://issues.apache.org/jira/browse/OAK-554?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

angela updated OAK-554:
-----------------------

    Component/s: core
    
> PropertyStates#createProperty ignores namespace mappings when creating states of type NAME and PATH
> ---------------------------------------------------------------------------------------------------
>
>                 Key: OAK-554
>                 URL: https://issues.apache.org/jira/browse/OAK-554
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: core
>            Reporter: angela
>
> as far as i saw we use PropertyStates#createProperty to create and
> set an OAK property from a given JCR value or a list of JCR values.
> this works well for all types of values except for NAME, PATH which 
> may contain values with remapped namespaces which will not be converted
> back to oak-values during the state creation:
> {code}
>      List<String> vals = Lists.newArrayList();
>      for (Value value : values) {
>          vals.add(value.getString());
>      }
>      return new MultiGenericPropertyState(name, vals, Type.fromTag(type, true));
> {code}
> if am not mistaken {code}value.getString(){code} will return the JCR
> representation of the value instead of the oak representation as it
> would be needed here.
> possible solutions include:
> - passing namepathmapper to the create method
> - only accept oak Value implementation that allows to retrieve the
>   internal representation, which is present in the ValueImpl afaik.

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