jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dürig (JIRA) <j...@apache.org>
Subject [jira] [Resolved] (OAK-554) PropertyStates#createProperty ignores namespace mappings when creating states of type NAME and PATH
Date Fri, 18 Jan 2013 16:24:12 GMT

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

Michael Dürig resolved OAK-554.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 0.6

Fixed at revision 1435216
                
> 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
>            Assignee: Michael Dürig
>             Fix For: 0.6
>
>
> 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

Mime
View raw message