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

Refactor mutable field in EqualsMethodUsage #614

Closed
wants to merge 2 commits into from

Conversation

Laurens-W
Copy link

What's changed?

Refactored mutable field to be scoped better

Anyone you would like to review specifically?

@knutwannheden

Checklist

  • I've added unit tests to cover both positive and negative cases
  • I've read and applied the recipe conventions and best practices
  • I've used the IntelliJ IDEA auto-formatter on affected files

@Laurens-W Laurens-W self-assigned this Oct 17, 2024
@timtebeek timtebeek added the enhancement New feature or request label Oct 21, 2024
@timtebeek
Copy link
Contributor

The motivation here is that it got flagged by our best practices recipes, where we do not want mutable static fields in recipes.

Following this change it should already no longer get flagged, so then it's merely a question of whether we want to keep this field in the recipe as a static field, or move it to every visitor instance. In the latter case it might not even make much sense anymore to store the J.Binary as a field, but I don't know enough of the motivation to cache this field and any implications on performance.

@timtebeek
Copy link
Contributor

Closing this PR due to the uncertainties and lack of actionable feedback.

@timtebeek timtebeek closed this Oct 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants