You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Radu Cotescu (Jira)" <ji...@apache.org> on 2020/01/15 15:44:00 UTC

[jira] [Closed] (SLING-8943) The Sling API ObjectConverter does not correctly convert JCR values

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

Radu Cotescu closed SLING-8943.
-------------------------------

> The Sling API ObjectConverter does not correctly convert JCR values
> -------------------------------------------------------------------
>
>                 Key: SLING-8943
>                 URL: https://issues.apache.org/jira/browse/SLING-8943
>             Project: Sling
>          Issue Type: Bug
>          Components: API
>    Affects Versions: API 2.21.0
>            Reporter: Radu Cotescu
>            Assignee: Radu Cotescu
>            Priority: Major
>             Fix For: API 2.22.0
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> SLING-8116 delegates value conversions to the {{org.osgi.util.converter.Converter}}. However, JCR values will be wrongly processed by the {{Converter}}, since it will first convert them to maps and then return the map's key if the key's type is the same as the conversion type. For JCR values, the Map's keys will be the value's public method names, whereas the values will be the invocation of said methods. This is definitely not the behaviour we want.
> The simplest solution would be to optionally import the {{javax.jcr}} API and, if present, add some custom rules based on {{javax.jcr.Value}} into the {{Converter}}.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)