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

FloatBuffer, DoubleBuffer are missing hashCode() methods #16

Open
niloc132 opened this issue May 27, 2024 · 0 comments
Open

FloatBuffer, DoubleBuffer are missing hashCode() methods #16

niloc132 opened this issue May 27, 2024 · 0 comments

Comments

@niloc132
Copy link
Member

Additionally equals and hashcode where they are present have incorrect Javadoc - they suggest that position and limit are not considered when comparing values, contrary to the implementation and specification. Note that this will not be reflected in generated docs (as these are emulated GWT/j2cl classes), but should be updated.

These types correctly have equals() implemented, but are missing their hashCode(), potentially leading to situations where two instances might be considered "equal" to each other, yet not have their hashcode match.

At a glance, behavior of hashcode seems unspecified, I'd be inclined to lean on the java.util.Arrays.hashCode() methods a sub-view, and some casting trickery to implement these.

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

No branches or pull requests

1 participant