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 "Michael Dürig (JIRA)" <ji...@apache.org> on 2013/01/18 16:46:13 UTC
[jira] [Assigned] (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 ]
Michael Dürig reassigned OAK-554:
---------------------------------
Assignee: Michael Dürig
> 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
>
> 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