From bb7eb11f22da7670efc9cc6600172f07bdb6411f Mon Sep 17 00:00:00 2001 From: Tim te Beek Date: Mon, 25 Nov 2024 09:49:20 +0000 Subject: [PATCH] refactor: OpenRewrite best practices Use this link to re-run the recipe: https://app.moderne.io/recipes/org.openrewrite.recipes.OpenRewriteBestPractices?organizationId=T3BlblJld3JpdGU%3D Co-authored-by: Moderne --- .../java/liberty/RemoveWas2LibertyNonPortableJndiLookup.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/openrewrite/java/liberty/RemoveWas2LibertyNonPortableJndiLookup.java b/src/main/java/org/openrewrite/java/liberty/RemoveWas2LibertyNonPortableJndiLookup.java index 2080825..a8ab2bc 100644 --- a/src/main/java/org/openrewrite/java/liberty/RemoveWas2LibertyNonPortableJndiLookup.java +++ b/src/main/java/org/openrewrite/java/liberty/RemoveWas2LibertyNonPortableJndiLookup.java @@ -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())) {