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

Unsafe equalsImpl for object list attributes #8

Closed
arttu-salminen-insta-fi opened this issue Nov 24, 2023 · 5 comments
Closed

Unsafe equalsImpl for object list attributes #8

arttu-salminen-insta-fi opened this issue Nov 24, 2023 · 5 comments
Assignees

Comments

@arttu-salminen-insta-fi
Copy link
Contributor

Generated equalsImpl methods do unsafe checks for OBJECT_LIST type attributes. Method will throw IndexOutOfBoundsException when other object list is shorter that this object list. Equals method should not throw exceptions, list sizes should be compared before trying to access variables in the list.

@brutzman
Copy link
Contributor

Thank you for this report. When convenient please identify an example class/method with code snippet to help ensure that we address the correct code blocks.

@terry-norbraten
Copy link
Collaborator

Screen Shot 2023-11-28 at 15 22 08
Screen Shot 2023-11-28 at 15 22 32
Screen Shot 2023-11-28 at 15 22 54

@arttu-salminen-insta-fi
Copy link
Contributor Author

Solution to this issue can be found here: arttu-salminen-insta-fi@91707b2 . This solution also provides null safe equals checks to SISO_BITFIELD and CLASSREF types while increasing the performance of equals checks. We'll create a pull request to this project.

@arttu-salminen-insta-fi
Copy link
Contributor Author

We've added solution to this issue to a previous pull request: #15

terry-norbraten added a commit that referenced this issue Dec 20, 2023
IFFPdu improvements #5 and Unsafe equalsImpl for object list attributes #8
@brutzman
Copy link
Contributor

Implemented as part of pull request.

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

3 participants