[
https://issues.apache.org/jira/browse/DELTASPIKE-321?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13605537#comment-13605537
]
Nicklas Karlsson commented on DELTASPIKE-321:
---------------------------------------------
Actually, this fix is not what the JIRA was about ;-)
There was never a NPE. The problem is that If I have a method like
public void foo(Object... params) {
...message().argument(params)...
}
the params will be an Object[] (empty or not, empty in my example in the JIRA).
When the Collections.addAll() is called, the one argument (our Object[]) is
considered an object and added as-is to the arguments where would would perhaps
think the the elements in the array would be added.
> DefaultMessage.argument(Serializable...) should guard against empty arrays
> --------------------------------------------------------------------------
>
> Key: DELTASPIKE-321
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-321
> Project: DeltaSpike
> Issue Type: Bug
> Components: Core
> Reporter: Nicklas Karlsson
> Assignee: John D. Ament
> Fix For: 0.4-incubating
>
>
> If you have a method with ... parameters, it will be interpreted as an array.
> If it is passed along to DefaultMessage.argument the object array is
> interpreted as an object and added as such. Now that I mention it, wouldn't
> the flow be the same even if the array came populated with data?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira