mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-15 00:17:45 +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
@@ -25,6 +25,8 @@ public @Builder class BuilderWithDeprecated {
|
||||
return this;
|
||||
}
|
||||
public @java.lang.Deprecated @java.lang.SuppressWarnings("all") BuilderWithDeprecated.BuilderWithDeprecatedBuilder strings(final java.util.Collection<? extends String> strings) {
|
||||
if ((strings == null))
|
||||
throw new java.lang.NullPointerException("strings cannot be null");
|
||||
if ((this.strings == null))
|
||||
this.strings = new java.util.ArrayList<String>();
|
||||
this.strings.addAll(strings);
|
||||
@@ -42,6 +44,8 @@ public @Builder class BuilderWithDeprecated {
|
||||
return this;
|
||||
}
|
||||
public @java.lang.Deprecated @java.lang.SuppressWarnings("all") BuilderWithDeprecated.BuilderWithDeprecatedBuilder numbers(final java.lang.Iterable<? extends Integer> numbers) {
|
||||
if ((numbers == null))
|
||||
throw new java.lang.NullPointerException("numbers cannot be null");
|
||||
if ((this.numbers == null))
|
||||
this.numbers = com.google.common.collect.ImmutableList.builder();
|
||||
this.numbers.addAll(numbers);
|
||||
|
||||
Reference in new issue
Block a user