From 6ed13dc505f0f0087270a24d39753838bffcacbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Schn=C3=A9ider?= Date: Tue, 26 Sep 2023 18:47:40 +0000 Subject: [PATCH] refactor: Spaces Use this link to re-run the recipe: https://app.moderne.io/recipes/org.openrewrite.java.format.Spaces?organizationId=T3BlblJld3JpdGU%3D Co-authored-by: Moderne --- src/main/java/org/openrewrite/analysis/controlflow/Guard.java | 4 ++-- .../java/org/openrewrite/analysis/trait/expr/VarAccess.java | 2 +- .../org/openrewrite/analysis/trait/variable/Parameter.java | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/openrewrite/analysis/controlflow/Guard.java b/src/main/java/org/openrewrite/analysis/controlflow/Guard.java index 21ea843c4..5943f2278 100644 --- a/src/main/java/org/openrewrite/analysis/controlflow/Guard.java +++ b/src/main/java/org/openrewrite/analysis/controlflow/Guard.java @@ -89,9 +89,9 @@ private static Optional> getControlParenthesesFromParent J.ControlParentheses parentControlParentheses; if (parent instanceof J.If) { parentControlParentheses = ((J.If) parent).getIfCondition(); - } else if (parent instanceof J.WhileLoop){ + } else if (parent instanceof J.WhileLoop) { parentControlParentheses = ((J.WhileLoop) parent).getCondition(); - } else if (parent instanceof J.DoWhileLoop){ + } else if (parent instanceof J.DoWhileLoop) { parentControlParentheses = ((J.DoWhileLoop) parent).getWhileCondition(); } else { parentControlParentheses = null; diff --git a/src/main/java/org/openrewrite/analysis/trait/expr/VarAccess.java b/src/main/java/org/openrewrite/analysis/trait/expr/VarAccess.java index 3f2ee0092..0af9508e3 100644 --- a/src/main/java/org/openrewrite/analysis/trait/expr/VarAccess.java +++ b/src/main/java/org/openrewrite/analysis/trait/expr/VarAccess.java @@ -119,7 +119,7 @@ public J visitIdentifier(J.Identifier ident, List varAccesses) { class VarAccessBase extends Top.Base implements VarAccess { private final Cursor cursor; private final J.Identifier identifier; - @Getter(lazy = true, onMethod = @__(@Override)) + @Getter(lazy = true, onMethod = @__(@Override)) private final Variable variable = computeVariable(this, cursor, identifier); @Override diff --git a/src/main/java/org/openrewrite/analysis/trait/variable/Parameter.java b/src/main/java/org/openrewrite/analysis/trait/variable/Parameter.java index 2fdec237b..2b38b1712 100644 --- a/src/main/java/org/openrewrite/analysis/trait/variable/Parameter.java +++ b/src/main/java/org/openrewrite/analysis/trait/variable/Parameter.java @@ -60,7 +60,7 @@ public Validation viewOf(Cursor c) { if (c.getValue() instanceof J.VariableDeclarations.NamedVariable) { Cursor variableDeclarationsCursor = c.getParentTreeCursor(); Cursor methodDeclarationCursor = variableDeclarationsCursor.getParentTreeCursor(); - return Method.viewOf(methodDeclarationCursor).map(callable -> new ParameterBase( + return Method.viewOf(methodDeclarationCursor).map(callable -> new ParameterBase( c, c.getValue(), variableDeclarationsCursor.getValue(),