mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-16 00:15:01 +00:00
Duplicate builder tests with setter prefix
This commit is contained in:
1 parent
cc070254a6
commit
36287f2ff9
68 files changed
+4015
No files matched your search
@@ -0,0 +1,40 @@
|
||||
class BuilderWithNonNull {
|
||||
@lombok.NonNull
|
||||
private final String id;
|
||||
@java.lang.SuppressWarnings("all")
|
||||
BuilderWithNonNull(@lombok.NonNull final String id) {
|
||||
if (id == null) {
|
||||
throw new java.lang.NullPointerException("id is marked non-null but is null");
|
||||
}
|
||||
this.id = id;
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public static class BuilderWithNonNullBuilder {
|
||||
@java.lang.SuppressWarnings("all")
|
||||
private String id;
|
||||
@java.lang.SuppressWarnings("all")
|
||||
BuilderWithNonNullBuilder() {
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public BuilderWithNonNullBuilder withId(@lombok.NonNull final String id) {
|
||||
if (id == null) {
|
||||
throw new java.lang.NullPointerException("id is marked non-null but is null");
|
||||
}
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public BuilderWithNonNull build() {
|
||||
return new BuilderWithNonNull(id);
|
||||
}
|
||||
@java.lang.Override
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public java.lang.String toString() {
|
||||
return "BuilderWithNonNull.BuilderWithNonNullBuilder(id=" + this.id + ")";
|
||||
}
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public static BuilderWithNonNullBuilder builder() {
|
||||
return new BuilderWithNonNullBuilder();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user