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

Fixed missing method bug caused by hash collisions. #12

Merged
merged 2 commits into from
May 31, 2013

Conversation

jcrussell
Copy link
Contributor

No description provided.

The hashCode methods used by MethodInfo and FieldInfo just used the
signature field to generate a hashCode. The signature field is only
available when the method/field involves generic types and was
otherwise set to the method/field name. Therefore, when there were
no generics and overloaded method names, only one would be stored.
Also, in cases where generics are used, multiple methods could have
the same signature (as the method name is not included).

Solution is to use the method name plus the method descriptor, which
should be unique. Also changed signature to be the empty string by
default instead of the method/field name.
bmc added a commit that referenced this pull request May 31, 2013
Fixed missing method bug caused by hash collisions.
@bmc bmc merged commit 23410a9 into bmc:master May 31, 2013
@bmc
Copy link
Owner

bmc commented May 31, 2013

Merged. Thanks. Will release a new version shortly.

@jcrussell
Copy link
Contributor Author

If you want to hold off on the new release, I have another small improvement that I'll submit soon.

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