You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Angela Schreiber (Jira)" <ji...@apache.org> on 2022/07/19 12:49:00 UTC

[jira] [Updated] (SLING-11466) JcrPropertyMapCacheEntry: ValueFormatException when converting value InputStream to number-array

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

Angela Schreiber updated SLING-11466:
-------------------------------------
    Description: 
this is related to SLING-11465:

when creating a {{JcrPropertyMapCacheEntry}} from a single-valued Binary Property and convert it to a number-array, the conversion will fail with {{ValueFormatException}}.

the reason is {{convertToArray}} is called with an array constructed from the singular property value. looping over the array will call {{convertToType}} with an index != -1 which results in {{Long.valueOf(this.property.getLengths()[index])}}. however, for a single-valued property {{getLengths}} fails with {{ValueFormatException}} -> consequently null is returned instead of the length of the property.

[~cziegeler] fyi

  was:
this is related to SLING-11465:

when creating a {{JcrPropertyMapCacheEntry}} from a single-valued Binary Property and convert it to a number-array, the conversion will fail with {{ValueFormatException}}.

the reason is {{convertToArray}} is called with an array constructed from the singular property value. looping over the array will call {{convertToType}} with an index != -1 which results in {{Long.valueOf(this.property.getLengths()[index])}}. however, for a single-valued property {{getLengths}} fails with {{ValueFormatException}} -> consequently null is returned instead of the length of the property.


> JcrPropertyMapCacheEntry: ValueFormatException when converting value InputStream to number-array
> ------------------------------------------------------------------------------------------------
>
>                 Key: SLING-11466
>                 URL: https://issues.apache.org/jira/browse/SLING-11466
>             Project: Sling
>          Issue Type: Bug
>          Components: JCR
>            Reporter: Angela Schreiber
>            Priority: Major
>
> this is related to SLING-11465:
> when creating a {{JcrPropertyMapCacheEntry}} from a single-valued Binary Property and convert it to a number-array, the conversion will fail with {{ValueFormatException}}.
> the reason is {{convertToArray}} is called with an array constructed from the singular property value. looping over the array will call {{convertToType}} with an index != -1 which results in {{Long.valueOf(this.property.getLengths()[index])}}. however, for a single-valued property {{getLengths}} fails with {{ValueFormatException}} -> consequently null is returned instead of the length of the property.
> [~cziegeler] fyi



--
This message was sent by Atlassian Jira
(v8.20.10#820010)