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

WFCORE-6369 Eliminate unnecessary collection copying in AbstractAddStepHandler constructors #5535

Merged
merged 3 commits into from Jul 3, 2023

Conversation

pferraro
Copy link
Contributor

@pferraro pferraro commented Jun 5, 2023

https://issues.redhat.com/browse/WFCORE-6369

Fix improper use of Set in AbstractAddStepHandler.Parameters, since AttributeDefinition is not hashable.

@pferraro pferraro requested a review from bstansberry June 5, 2023 18:47
@github-actions github-actions bot added the deps-ok Dependencies have been checked, and there are no significant changes label Jun 5, 2023
Collect into list rather than set for heap efficiency, and because AttributeDefinition does not implement hashCode/equals.
Copy link
Collaborator

@yersan yersan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, @bstansberry you already did a review, anything else from your side?

Copy link
Contributor

@bstansberry bstansberry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This approach changes the semantics of the protected 'attributes' field by making it immutable, but that's fine with me; as I'd have been ok with making it private.

We should follow this up by deprecating the field an adding a 'protected final Collection getAttributes()' javadoced as returning an immutable collection. But that doesn't need to block merging this.

@yersan yersan added the ready-for-merge This PR is ready to be merged and fulfills all requirements label Jul 3, 2023
@yersan
Copy link
Collaborator

yersan commented Jul 3, 2023

I created https://issues.redhat.com/browse/WFCORE-6419 to follow up on the last comment

@yersan yersan merged commit bf41efc into wildfly:main Jul 3, 2023
12 checks passed
@yersan
Copy link
Collaborator

yersan commented Jul 3, 2023

Thanks @pferraro / @bstansberry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deps-ok Dependencies have been checked, and there are no significant changes ready-for-merge This PR is ready to be merged and fulfills all requirements
Projects
None yet
3 participants