Skip to content

Conversation

@gjarzab
Copy link
Contributor

@gjarzab gjarzab commented Apr 13, 2021

As a performance optimization MethodNode generates a hash of method argument types to determine if the node has already completed initialization.

Currently the hashing logic relies on a fixed set of prime numbers, to combine the hash values of each of the argument types.
Typically this is not an issue, however, in cases where params arguments are involved this can cause issues.

When the number of argument exceeds 124 an IndexOutOfRangeException is thrown.

This change makes use of the HashCode type which provides functionality for merging hash codes.

@lahma lahma merged commit a5cb7a7 into spring-projects:master Apr 13, 2021
@lahma
Copy link
Collaborator

lahma commented Apr 13, 2021

Thank you!

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