Skip to content

Commit

Permalink
Apply best practices to InstanceOfPatternMatch
Browse files Browse the repository at this point in the history
  • Loading branch information
timtebeek authored Oct 7, 2024
1 parent 34b5938 commit 6646f06
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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_();
}
Expand Down

0 comments on commit 6646f06

Please sign in to comment.