diff options
author | Reinier Zwitserloot <r.zwitserloot@projectlombok.org> | 2020-01-18 03:10:07 +0100 |
---|---|---|
committer | Reinier Zwitserloot <r.zwitserloot@projectlombok.org> | 2020-01-28 16:21:39 +0100 |
commit | 91a40b83125808d3684ce07c5cb4a2927d0b979c (patch) | |
tree | ee1105aa16d2db522e26ea16cf11579fee81d893 /test/transform/resource/after-delombok/BuilderSingularNoAutoWithSetterPrefix.java | |
parent | 6cc74e42295b6138629c6b32dd56a99ee8c2c646 (diff) | |
download | lombok-91a40b83125808d3684ce07c5cb4a2927d0b979c.tar.gz lombok-91a40b83125808d3684ce07c5cb4a2927d0b979c.tar.bz2 lombok-91a40b83125808d3684ce07c5cb4a2927d0b979c.zip |
[singular][issue #2221] the plural builder method now nullchecks its argument with configurable results.
Diffstat (limited to 'test/transform/resource/after-delombok/BuilderSingularNoAutoWithSetterPrefix.java')
-rw-r--r-- | test/transform/resource/after-delombok/BuilderSingularNoAutoWithSetterPrefix.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/transform/resource/after-delombok/BuilderSingularNoAutoWithSetterPrefix.java b/test/transform/resource/after-delombok/BuilderSingularNoAutoWithSetterPrefix.java index 57bef625..a023b82a 100644 --- a/test/transform/resource/after-delombok/BuilderSingularNoAutoWithSetterPrefix.java +++ b/test/transform/resource/after-delombok/BuilderSingularNoAutoWithSetterPrefix.java @@ -28,6 +28,7 @@ class BuilderSingularNoAutoWithSetterPrefix { } @java.lang.SuppressWarnings("all") public 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); return this; @@ -45,6 +46,7 @@ class BuilderSingularNoAutoWithSetterPrefix { } @java.lang.SuppressWarnings("all") public 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); return this; @@ -62,6 +64,7 @@ class BuilderSingularNoAutoWithSetterPrefix { } @java.lang.SuppressWarnings("all") public 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); return this; |