mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-14 22:17:41 +00:00
[issue #2221] simplified configuration for @Singular-generated plural form nullchecks.
This commit is contained in:
85 files changed
+517
-643
No files matched your search
@@ -16,7 +16,9 @@ import lombok.Singular;
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") BuilderSingularNoAuto.BuilderSingularNoAutoBuilder things(final java.util.Collection<? extends String> things) {
|
||||
if ((things == null))
|
||||
throw new java.lang.NullPointerException("things cannot be 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);
|
||||
@@ -35,7 +37,9 @@ import lombok.Singular;
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") BuilderSingularNoAuto.BuilderSingularNoAutoBuilder widgets(final java.util.Collection<? extends String> widgets) {
|
||||
if ((widgets == null))
|
||||
throw new java.lang.NullPointerException("widgets cannot be 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);
|
||||
@@ -54,7 +58,9 @@ import lombok.Singular;
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") BuilderSingularNoAuto.BuilderSingularNoAutoBuilder items(final java.util.Collection<? extends String> items) {
|
||||
if ((items == null))
|
||||
throw new java.lang.NullPointerException("items cannot be 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