Skip to content

Conversation

artembilan
Copy link
Member

The plain cast like (Object[]) array doesn't work for array of
primitives - fails with ClassCastException

  • Use ObjectUtils.toObjectArray() instead which does a smart job to
    determine a wrapper for primitive and cast into that array of types
    afterwards

The plain cast like `(Object[]) array` doesn't work for array of
primitives - fails with `ClassCastException`

* Use `ObjectUtils.toObjectArray()` instead which does a smart job to
determine a wrapper for primitive and cast into that array of types
afterwards
@artembilan
Copy link
Member Author

The fix for master is included in the #2954

@garyrussell garyrussell merged commit 5ad4f62 into spring-projects:5.1.x Jun 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants