From 6646f06a29dd7dee48674dc3389959036fcfe47d Mon Sep 17 00:00:00 2001 From: Tim te Beek Date: Mon, 7 Oct 2024 14:28:41 +0200 Subject: [PATCH] Apply best practices to InstanceOfPatternMatch --- .../openrewrite/staticanalysis/InstanceOfPatternMatch.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/openrewrite/staticanalysis/InstanceOfPatternMatch.java b/src/main/java/org/openrewrite/staticanalysis/InstanceOfPatternMatch.java index bff256afa..5975d072b 100644 --- a/src/main/java/org/openrewrite/staticanalysis/InstanceOfPatternMatch.java +++ b/src/main/java/org/openrewrite/staticanalysis/InstanceOfPatternMatch.java @@ -300,9 +300,9 @@ private String patternVariableName(J.InstanceOf instanceOf, Cursor cursor) { VariableNameStrategy strategy; if (root instanceof J.If) { VariableAndTypeTree variableData = variablesToDelete.get(instanceOf); - strategy = variableData != null - ? VariableNameStrategy.exact(variableData.getVariable().getSimpleName()) - : VariableNameStrategy.normal(contextScopes.get(instanceOf)); + strategy = variableData != null ? + VariableNameStrategy.exact(variableData.getVariable().getSimpleName()) : + VariableNameStrategy.normal(contextScopes.get(instanceOf)); } else { strategy = VariableNameStrategy.short_(); }