mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-15 12:14:31 +00:00
[singular][issue #2221] the plural builder method now nullchecks its argument with configurable results.
This commit is contained in:
79 files changed
+841
-114
No files matched your search
@@ -15,6 +15,8 @@ import lombok.Singular;
|
||||
return this;
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") BuilderSingularNoAutoWithSetterPrefix.BuilderSingularNoAutoWithSetterPrefixBuilder withThings(final java.util.Collection<? extends String> things) {
|
||||
if ((things == null))
|
||||
throw new java.lang.NullPointerException("things cannot be null");
|
||||
if ((this.things == null))
|
||||
this.things = new java.util.ArrayList<String>();
|
||||
this.things.addAll(things);
|
||||
@@ -32,6 +34,8 @@ import lombok.Singular;
|
||||
return this;
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") BuilderSingularNoAutoWithSetterPrefix.BuilderSingularNoAutoWithSetterPrefixBuilder withWidgets(final java.util.Collection<? extends String> widgets) {
|
||||
if ((widgets == null))
|
||||
throw new java.lang.NullPointerException("widgets cannot be null");
|
||||
if ((this.widgets == null))
|
||||
this.widgets = new java.util.ArrayList<String>();
|
||||
this.widgets.addAll(widgets);
|
||||
@@ -49,6 +53,8 @@ import lombok.Singular;
|
||||
return this;
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") BuilderSingularNoAutoWithSetterPrefix.BuilderSingularNoAutoWithSetterPrefixBuilder withItems(final java.util.Collection<? extends String> items) {
|
||||
if ((items == null))
|
||||
throw new java.lang.NullPointerException("items cannot be null");
|
||||
if ((this.items == null))
|
||||
this.items = new java.util.ArrayList<String>();
|
||||
this.items.addAll(items);
|
||||
|
||||
Reference in new issue
Block a user