Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
timo-a and github-actions[bot] authored Dec 15, 2024
1 parent 744065b commit b09a4e5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ private J.VariableDeclarations fixFormat(J.VariableDeclarations initial, J.Varia

boolean isAnnotationOnLineAbove = initial.toString().contains("@Getter\n");

boolean isTopAnnotationRemoved = !initial.getLeadingAnnotations().isEmpty()
&& initial.getLeadingAnnotations()
boolean isTopAnnotationRemoved = !initial.getLeadingAnnotations().isEmpty() &&
initial.getLeadingAnnotations()
.get(0)
.getSimpleName().equals("Getter");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ public J.VariableDeclarations visitVariableDeclarations(J.VariableDeclarations v
boolean hasSetterAnnotation = variableDecls != visited;
if (hasSetterAnnotation) {
return fixFormat(variableDecls, visited, ctx);
} else if (variableDecls.hasModifier(J.Modifier.Type.Final)
|| variableDecls.hasModifier(J.Modifier.Type.Static)) {
} else if (variableDecls.hasModifier(J.Modifier.Type.Final) ||
variableDecls.hasModifier(J.Modifier.Type.Static)) {
//final fields and static field don't need to have an annotation
return visited;
} else {
Expand All @@ -107,8 +107,8 @@ private J.VariableDeclarations fixFormat(J.VariableDeclarations initial, J.Varia

boolean isAnnotationOnLineAbove = initial.toString().contains("@Setter\n");

boolean isTopAnnotationRemoved = !initial.getLeadingAnnotations().isEmpty()
&& initial.getLeadingAnnotations()
boolean isTopAnnotationRemoved = !initial.getLeadingAnnotations().isEmpty() &&
initial.getLeadingAnnotations()
.get(0)
.getSimpleName().equals("Setter");

Expand Down

0 comments on commit b09a4e5

Please sign in to comment.