Refactor ObjectComparison to utility class#949
Merged
Conversation
Member
|
Why a singleton is needed at all? The object seems to be stateless, so actually it is a bunch of static helper methods? |
Member
Author
|
I noticed multiple instances being created during repeated operations in visualVM so tried a singleton to avoid that. However, as you pointed the class is stateless, I believe this optimization isn’t really necessary. Will close this PR then |
Member
|
maybe it would be better to
This will prevent later confusion if someone would start adding state to this utility class... |
Member
Author
Sure 👍 |
Member
Author
|
Will merge this soon 👍 |
Convert ObjectComparison to a static utility class by hiding the constructor and making all methods static.
Member
Author
|
I hope its good to be merged now |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What it does
Convert ObjectComparison to a static utility class by hiding the constructor and making all methods static.
How to test
Author checklist