-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…u generate a builder, that builder wouldn’t make the build or toString methods because it thinks the builder-setter methods it just generated that so happen to have that name indicate you don’t want lombok to do that. You really shouldn’t name any fields builder or toString, though.
- Loading branch information
1 parent
9608113
commit 3d0beec
Showing
5 changed files
with
99 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
test/transform/resource/after-delombok/BuilderWithBadNames.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
public class BuilderWithBadNames { | ||
String build; | ||
String toString; | ||
@java.lang.SuppressWarnings("all") | ||
BuilderWithBadNames(final String build, final String toString) { | ||
this.build = build; | ||
this.toString = toString; | ||
} | ||
@java.lang.SuppressWarnings("all") | ||
public static class BuilderWithBadNamesBuilder { | ||
@java.lang.SuppressWarnings("all") | ||
private String build; | ||
@java.lang.SuppressWarnings("all") | ||
private String toString; | ||
@java.lang.SuppressWarnings("all") | ||
BuilderWithBadNamesBuilder() { | ||
} | ||
@java.lang.SuppressWarnings("all") | ||
public BuilderWithBadNamesBuilder build(final String build) { | ||
this.build = build; | ||
return this; | ||
} | ||
@java.lang.SuppressWarnings("all") | ||
public BuilderWithBadNamesBuilder toString(final String toString) { | ||
this.toString = toString; | ||
return this; | ||
} | ||
@java.lang.SuppressWarnings("all") | ||
public BuilderWithBadNames build() { | ||
return new BuilderWithBadNames(build, toString); | ||
} | ||
@java.lang.Override | ||
@java.lang.SuppressWarnings("all") | ||
public java.lang.String toString() { | ||
return "BuilderWithBadNames.BuilderWithBadNamesBuilder(build=" + this.build + ", toString=" + this.toString + ")"; | ||
} | ||
} | ||
@java.lang.SuppressWarnings("all") | ||
public static BuilderWithBadNamesBuilder builder() { | ||
return new BuilderWithBadNamesBuilder(); | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
test/transform/resource/after-ecj/BuilderWithBadNames.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
public @lombok.Builder class BuilderWithBadNames { | ||
public static @java.lang.SuppressWarnings("all") class BuilderWithBadNamesBuilder { | ||
private @java.lang.SuppressWarnings("all") String build; | ||
private @java.lang.SuppressWarnings("all") String toString; | ||
@java.lang.SuppressWarnings("all") BuilderWithBadNamesBuilder() { | ||
super(); | ||
} | ||
public @java.lang.SuppressWarnings("all") BuilderWithBadNamesBuilder build(final String build) { | ||
this.build = build; | ||
return this; | ||
} | ||
public @java.lang.SuppressWarnings("all") BuilderWithBadNamesBuilder toString(final String toString) { | ||
this.toString = toString; | ||
return this; | ||
} | ||
public @java.lang.SuppressWarnings("all") BuilderWithBadNames build() { | ||
return new BuilderWithBadNames(build, toString); | ||
} | ||
public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { | ||
return (((("BuilderWithBadNames.BuilderWithBadNamesBuilder(build=" + this.build) + ", toString=") + this.toString) + ")"); | ||
} | ||
} | ||
String build; | ||
String toString; | ||
@java.lang.SuppressWarnings("all") BuilderWithBadNames(final String build, final String toString) { | ||
super(); | ||
this.build = build; | ||
this.toString = toString; | ||
} | ||
public static @java.lang.SuppressWarnings("all") BuilderWithBadNamesBuilder builder() { | ||
return new BuilderWithBadNamesBuilder(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
@lombok.Builder | ||
public class BuilderWithBadNames { | ||
String build; | ||
String toString; | ||
} |