You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Carsten Ziegeler (JIRA)" <ji...@apache.org> on 2014/03/13 13:23:42 UTC
[jira] [Resolved] (SLING-3452) JSON Renderer can't handle arrays of
simply types
[ https://issues.apache.org/jira/browse/SLING-3452?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Carsten Ziegeler resolved SLING-3452.
-------------------------------------
Resolution: Fixed
Fixed by using the Arrays class to access the array instead of directly casting to Object[]
> JSON Renderer can't handle arrays of simply types
> -------------------------------------------------
>
> Key: SLING-3452
> URL: https://issues.apache.org/jira/browse/SLING-3452
> Project: Sling
> Issue Type: Bug
> Components: Servlets
> Affects Versions: Servlets Get 2.1.6
> Reporter: Carsten Ziegeler
> Assignee: Carsten Ziegeler
> Fix For: Servlets Get 2.1.8
>
>
> When a property contains an array of a simple type like long[] etc, a ClassCastException occurs:
> java.lang.ClassCastException: [J cannot be cast to [Ljava.lang.Object;
> at org.apache.sling.servlets.get.impl.helpers.JsonObjectCreator.createProperty(JsonObjectCreator.java:179)
--
This message was sent by Atlassian JIRA
(v6.2#6252)