Skip to content

Commit

Permalink
refactor: OpenRewrite best practices
Browse files Browse the repository at this point in the history
Use this link to re-run the recipe: https://app.moderne.io/recipes/org.openrewrite.recipes.OpenRewriteBestPractices?organizationId=T3BlblJld3JpdGU%3D

Co-authored-by: Moderne <team@moderne.io>
  • Loading branch information
timtebeek and TeamModerne committed Nov 25, 2024
1 parent 5b9af0d commit bb7eb11
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ public J.VariableDeclarations visitVariableDeclarations(J.VariableDeclarations v
@Override
public J.Assignment visitAssignment(J.Assignment assignment, ExecutionContext ctx) {
Expression assignmentVariable = assignment.getVariable();
if (!(assignmentVariable instanceof J.Identifier)) return assignment;
if (!(assignmentVariable instanceof J.Identifier)) {
return assignment;
}
J.Identifier assignmentVariableIdentifier = (J.Identifier) assignmentVariable;
JavaType.Variable variable = assignmentVariableIdentifier.getFieldType();
if (!checkForPropertiesVariable(variable, assignment.getAssignment())) {
Expand Down

0 comments on commit bb7eb11

Please sign in to comment.