Skip to content

Fix SplitterMH for primitive arrays cast #2964

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

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