[
https://issues.apache.org/jira/browse/OAK-10101?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andrei Dulceanu resolved OAK-10101.
-----------------------------------
Resolution: Fixed
Fixed in trunk at
[aa492521af6bbe6f3bc3a75e6044d568f42ed5ed|https://github.com/apache/jackrabbit-oak/commit/aa492521af6bbe6f3bc3a75e6044d568f42ed5ed].
> Improve exception message when retrieving String properties
> -----------------------------------------------------------
>
> Key: OAK-10101
> URL: https://issues.apache.org/jira/browse/OAK-10101
> Project: Jackrabbit Oak
> Issue Type: Task
> Components: segment-tar
> Affects Versions: 1.48.0
> Reporter: Andrei Dulceanu
> Assignee: Andrei Dulceanu
> Priority: Major
> Fix For: 1.50.0
>
>
> If we have a property of type {{BINARIES}} and we try to read it, using the
> Oak API, as an array of {{{}STRING{}}}, then the exception message of the
> correctly raised {{IllegalStateException}} is:
> {noformat}
> java.lang.IllegalStateException: String is too long: 2325884045577463478"
> (where the number is basically random) {noformat}
> In order to give a hint to the caller about what might go wrong, we should
> improve the exception message:
> {noformat}
> throw new IllegalStateException("String is too long: " + length + "; possibly
> trying to read a BLOB using getString; can not convert BLOB to String");
> {noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)