jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OAK-815) Wrong type for empty multi-valued property
Date Mon, 13 May 2013 13:55:17 GMT

    [ https://issues.apache.org/jira/browse/OAK-815?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13655974#comment-13655974
] 

Jukka Zitting commented on OAK-815:
-----------------------------------

The {{PropertyState}} interface is designed to keep track of the correct type even for empty
arrays, it's the JSON/P mapping in the {{MicroKernel}} where we lose the type information.
Since we already do have a way to encode non-standard value type information in JSON/P for
non-string single-valued properties, I'd prefer to leverage that mechanism also for empty
non-string arrays. In other words, instead of using {{[]}} for all empty arrays, that syntax
would only be used for string arrays, and empty arrays with other types would be stored as
type-coded strings like "{{[0]:long}}" or "{{[0]:reference}}".
                
> Wrong type for empty multi-valued property
> ------------------------------------------
>
>                 Key: OAK-815
>                 URL: https://issues.apache.org/jira/browse/OAK-815
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: core, jcr
>    Affects Versions: 0.7
>            Reporter: Marcel Reutegger
>             Fix For: 0.8
>
>
> While implementing JCR versioning in Oak I noticed that the type for a multi-valued property
with an empty array returns the wrong type. E.g. this happens when a node is checked in and
the jcr:predecessors property is set to an empty array. Property.getType() then says it's
of type STRING, while in fact it should say it's of type REFERENCE.

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