[
https://issues.apache.org/jira/browse/KARAF-2991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14005789#comment-14005789
]
Stefano Lenzi commented on KARAF-2991:
--------------------------------------
Yes you are right, it pass all the test, the only issue may happen if someone
implements its own Collection that does not inherit from AbstractCollection. In
fact,your implementation rely on AbstractCollection.toString() method, while
mine convert the Collections to Object[] (you can achieve the same result with
using the iterator, it should have a lower memory footprint).
Nevertheless, it is a very limited case, but I have created a patch that shows
my example and that updated your code supporting this limited case
> Shell Console throws exception when a service contains int[] as value for a
> property
> ------------------------------------------------------------------------------------
>
> Key: KARAF-2991
> URL: https://issues.apache.org/jira/browse/KARAF-2991
> Project: Karaf
> Issue Type: Bug
> Components: karaf-shell
> Affects Versions: 3.0.1
> Environment: Karaf 3.0.1
> Reporter: Stefano Lenzi
> Assignee: Guillaume Nodet
> Priority: Minor
> Fix For: 2.4.0, 4.0.0, 3.0.2, 2.3.6
>
> Attachments: bug.txt, collections-patch.diff, patch.diff
>
>
> When invoking the ls command from the shell, when the command finds a service
> which contains a property with an array of native objects (e.g int[], long[],
> and so on) it stops by throwing a cast exception
--
This message was sent by Atlassian JIRA
(v6.2#6252)