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 "Alex Parvulescu (JIRA)" <ji...@apache.org> on 2014/08/27 11:22:57 UTC

[jira] [Commented] (OAK-2055) SegmentPropertyState.getValue(Type.STRING) on a binary throws a strange exception

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

Alex Parvulescu commented on OAK-2055:
--------------------------------------

For the inlined binaries the behavior is you'll get back a string representation of the binary itself.

> SegmentPropertyState.getValue(Type.STRING) on a binary throws a strange exception
> ---------------------------------------------------------------------------------
>
>                 Key: OAK-2055
>                 URL: https://issues.apache.org/jira/browse/OAK-2055
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: segmentmk
>            Reporter: Thomas Mueller
>            Priority: Minor
>             Fix For: 1.1
>
>         Attachments: ExternalBlobTest.java.patch
>
>
> Calling the method PropertyState.getValue(Type.STRING) on a binary property can throw an exception with the strange message "java.lang.IllegalStateException: String is too long: 2318847354967717297".
> According to the documentation of getValue, it is expected to automatically convert the value to a string in this case: "If the target type is not the same as the type of this property an attempt is made to convert the value to the target type. If the conversion fails an exception is thrown. The actual conversions which take place are those defined in the  org.apache.jackrabbit.oak.plugins.value.Conversions class."



--
This message was sent by Atlassian JIRA
(v6.2#6252)