Skip to content

Commit

Permalink
minor polish
Browse files Browse the repository at this point in the history
  • Loading branch information
timo-a committed Dec 15, 2024
1 parent 33d9ef7 commit 2422a92
Showing 1 changed file with 7 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,23 +39,19 @@ public class NormalizeGetter extends ScanningRecipe<NormalizeGetter.MethodAcc> {

@Override
public String getDisplayName() {
//language=markdown
return "Rename getter methods to fit lombok";
}

@Override
public String getDescription() {
//language=markdown
return new StringJoiner("\n")
.add("Rename methods that are effectively getter to the name lombok would give them.")
.add("")
.add("Limitations:")
.add("")
.add(" - If two methods in a class are effectively the same getter then one's name will be corrected and the others name will be left as it is.")
.add(" - If the correct name for a method is already taken by another method then the name will not be corrected.")
.add(" - Method name swaps or circular renaming within a class cannot be performed because the names block each other. ")
.add("E.g. `int getFoo() { return ba; } int getBa() { return foo; }` stays as it is.")
.toString();
return "Rename methods that are effectively getter to the name lombok would give them.\n\n" +
"Limitations:\n" +
" - If two methods in a class are effectively the same getter then one's name will be corrected and the others name will be left as it is." +
" - If the correct name for a method is already taken by another method then the name will not be corrected." +
" - Method name swaps or circular renaming within a class cannot be performed because the names block each other. " +
"E.g. `int getFoo() { return ba; } int getBa() { return foo; }` stays as it is."
;
}

public static class MethodAcc {
Expand Down

0 comments on commit 2422a92

Please sign in to comment.