Skip to content
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

Use Constructor#getParameterCount() instead of getParameterTypes().length #3634

Merged
merged 1 commit into from
Oct 18, 2022

Conversation

snuyanzin
Copy link
Contributor

The issue with Constructor#getParameterTypes that each time it creates a new array by calling clone on existing one. It does not make sense for the cases when only knowledge about array size is required

…ngth

The issue with `Constructor#getParameterTypes` that each time it creates a new array by calling `clone` on existing one.
It does not make sense for the cases when only knowledge about array size is required
@cowtowncoder
Copy link
Member

cowtowncoder commented Oct 18, 2022

Interesting: all other uses have been replaced earlier, not sure how this was left (this method is in Java 8 so it could only be used in Jackson 2.12 or so when baseline increased to Java 8).

Thanks!

@cowtowncoder cowtowncoder merged commit 5b036e1 into FasterXML:2.14 Oct 18, 2022
@cowtowncoder cowtowncoder added this to the 2.14.0 milestone Oct 18, 2022
@vitalyster
Copy link

This breaks compatibility with Android < API26, see #3412

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.

3 participants