Skip to content

Conversation

@AlekSimpson
Copy link
Contributor

What's changed?

This PR fixes a bug having to do with the FinalizePrivateFields recipe adding the final flag to variables that also have the volatile flag which is invalid.

What's your motivation?

#121

Anyone you would like to review specifically?

@timtebeek

Checklist

  • I've added unit tests to cover both positive and negative cases
  • I've added the license header to any new files through ./gradlew licenseFormat
  • I've used the IntelliJ auto-formatter on affected files
  • I've updated the documentation (if applicable)

@AlekSimpson AlekSimpson added the bug Something isn't working label Jul 18, 2023
@AlekSimpson AlekSimpson requested a review from timtebeek July 18, 2023 19:53
@AlekSimpson AlekSimpson self-assigned this Jul 18, 2023
@AlekSimpson AlekSimpson linked an issue Jul 18, 2023 that may be closed by this pull request
*/
package org.openrewrite.staticanalysis;

import fj.P;
Copy link
Member

Choose a reason for hiding this comment

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

This looks unused

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah good catch

@sambsnyd sambsnyd merged commit cec4985 into main Jul 18, 2023
@sambsnyd sambsnyd deleted the alek/Fix121 branch July 18, 2023 20:06
@sambsnyd
Copy link
Member

Thanks @AlekSimpson !

timtebeek added a commit that referenced this pull request Jul 18, 2023
@timtebeek
Copy link
Member

Saw room for a slight improvement in 0893bd3; pushed directly to main after seeing the test pass locally. Thanks for getting this started & fixed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

FinalizePrivateFields must not change volatile fields

4 participants