aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource
diff options
context:
space:
mode:
Diffstat (limited to 'test/transform/resource')
-rw-r--r--test/transform/resource/after-delombok/BuilderDefaultsWarnings.java4
-rw-r--r--test/transform/resource/after-delombok/BuilderSingularAnnotatedTypes.java8
-rw-r--r--test/transform/resource/after-delombok/BuilderSingularAnnotatedTypesWithSetterPrefix.java8
-rw-r--r--test/transform/resource/after-delombok/BuilderSingularGuavaListsSets.java20
-rw-r--r--test/transform/resource/after-delombok/BuilderSingularGuavaMaps.java12
-rw-r--r--test/transform/resource/after-delombok/BuilderSingularLists.java12
-rw-r--r--test/transform/resource/after-delombok/BuilderSingularMaps.java16
-rw-r--r--test/transform/resource/after-delombok/BuilderSingularMapsWithSetterPrefix.java57
-rw-r--r--test/transform/resource/after-delombok/BuilderSingularNoAuto.java12
-rw-r--r--test/transform/resource/after-delombok/BuilderSingularNoAutoWithSetterPrefix.java12
-rw-r--r--test/transform/resource/after-delombok/BuilderSingularNullBehavior1.java91
-rw-r--r--test/transform/resource/after-delombok/BuilderSingularNullBehavior2.java52
-rw-r--r--test/transform/resource/after-delombok/BuilderSingularRedirectToGuava.java12
-rw-r--r--test/transform/resource/after-delombok/BuilderSingularSets.java16
-rw-r--r--test/transform/resource/after-delombok/BuilderSingularSetsWithSetterPrefix.java16
-rw-r--r--test/transform/resource/after-delombok/BuilderSingularToBuilderWithNull.java4
-rw-r--r--test/transform/resource/after-delombok/BuilderSingularToBuilderWithNullWithSetterPrefix.java4
-rw-r--r--test/transform/resource/after-delombok/BuilderSingularWildcardListsWithToBuilder.java8
-rw-r--r--test/transform/resource/after-delombok/BuilderSingularWithPrefixes.java4
-rw-r--r--test/transform/resource/after-delombok/BuilderSingularWithPrefixesWithSetterPrefix.java4
-rw-r--r--test/transform/resource/after-delombok/BuilderWithDeprecated.java8
-rw-r--r--test/transform/resource/after-delombok/BuilderWithToBuilder.java4
-rw-r--r--test/transform/resource/after-delombok/CheckerFrameworkBuilder.java4
-rw-r--r--test/transform/resource/after-delombok/CheckerFrameworkSuperBuilder.java4
-rw-r--r--test/transform/resource/after-delombok/SuperBuilderBasic.java4
-rw-r--r--test/transform/resource/after-delombok/SuperBuilderBasicToBuilder.java4
-rw-r--r--test/transform/resource/after-delombok/SuperBuilderSingularAnnotatedTypes.java8
-rw-r--r--test/transform/resource/after-delombok/SuperBuilderWithCustomBuilderMethod.java4
-rw-r--r--test/transform/resource/after-delombok/SuperBuilderWithGenerics.java4
-rw-r--r--test/transform/resource/after-delombok/SuperBuilderWithGenerics2.java4
-rw-r--r--test/transform/resource/after-delombok/SuperBuilderWithGenericsAndToBuilder.java4
-rw-r--r--test/transform/resource/after-delombok/SuperBuilderWithPrefixes.java4
-rw-r--r--test/transform/resource/after-ecj/BuilderDefaultsWarnings.java4
-rw-r--r--test/transform/resource/after-ecj/BuilderSingularAnnotatedTypes.java8
-rw-r--r--test/transform/resource/after-ecj/BuilderSingularAnnotatedTypesWithSetterPrefix.java8
-rw-r--r--test/transform/resource/after-ecj/BuilderSingularGuavaListsSets.java20
-rw-r--r--test/transform/resource/after-ecj/BuilderSingularGuavaMaps.java12
-rw-r--r--test/transform/resource/after-ecj/BuilderSingularLists.java12
-rw-r--r--test/transform/resource/after-ecj/BuilderSingularMaps.java16
-rw-r--r--test/transform/resource/after-ecj/BuilderSingularMapsWithSetterPrefix.java71
-rw-r--r--test/transform/resource/after-ecj/BuilderSingularNoAuto.java12
-rw-r--r--test/transform/resource/after-ecj/BuilderSingularNoAutoWithSetterPrefix.java12
-rw-r--r--test/transform/resource/after-ecj/BuilderSingularNullBehavior1.java94
-rw-r--r--test/transform/resource/after-ecj/BuilderSingularNullBehavior2.java49
-rw-r--r--test/transform/resource/after-ecj/BuilderSingularRedirectToGuava.java12
-rw-r--r--test/transform/resource/after-ecj/BuilderSingularSets.java16
-rw-r--r--test/transform/resource/after-ecj/BuilderSingularSetsWithSetterPrefix.java16
-rw-r--r--test/transform/resource/after-ecj/BuilderSingularToBuilderWithNull.java4
-rw-r--r--test/transform/resource/after-ecj/BuilderSingularToBuilderWithNullWithSetterPrefix.java4
-rw-r--r--test/transform/resource/after-ecj/BuilderSingularWildcardListsWithToBuilder.java8
-rw-r--r--test/transform/resource/after-ecj/BuilderSingularWithPrefixes.java4
-rw-r--r--test/transform/resource/after-ecj/BuilderSingularWithPrefixesWithSetterPrefix.java4
-rw-r--r--test/transform/resource/after-ecj/BuilderWithDeprecated.java8
-rw-r--r--test/transform/resource/after-ecj/BuilderWithToBuilder.java4
-rw-r--r--test/transform/resource/after-ecj/CheckerFrameworkBuilder.java4
-rw-r--r--test/transform/resource/after-ecj/CheckerFrameworkSuperBuilder.java4
-rw-r--r--test/transform/resource/after-ecj/SuperBuilderBasic.java4
-rw-r--r--test/transform/resource/after-ecj/SuperBuilderBasicToBuilder.java4
-rw-r--r--test/transform/resource/after-ecj/SuperBuilderSingularAnnotatedTypes.java8
-rw-r--r--test/transform/resource/after-ecj/SuperBuilderWithCustomBuilderMethod.java4
-rw-r--r--test/transform/resource/after-ecj/SuperBuilderWithGenerics.java4
-rw-r--r--test/transform/resource/after-ecj/SuperBuilderWithGenerics2.java4
-rw-r--r--test/transform/resource/after-ecj/SuperBuilderWithGenericsAndToBuilder.java4
-rw-r--r--test/transform/resource/after-ecj/SuperBuilderWithPrefixes.java4
-rw-r--r--test/transform/resource/before/BuilderSingularMapsWithSetterPrefix.java3
-rw-r--r--test/transform/resource/before/BuilderSingularNullBehavior1.java7
-rw-r--r--test/transform/resource/before/BuilderSingularNullBehavior2.java7
67 files changed, 455 insertions, 432 deletions
diff --git a/test/transform/resource/after-delombok/BuilderDefaultsWarnings.java b/test/transform/resource/after-delombok/BuilderDefaultsWarnings.java
index 04cd3bbb..3c84c71b 100644
--- a/test/transform/resource/after-delombok/BuilderDefaultsWarnings.java
+++ b/test/transform/resource/after-delombok/BuilderDefaultsWarnings.java
@@ -38,7 +38,9 @@ public class BuilderDefaultsWarnings {
}
@java.lang.SuppressWarnings("all")
public BuilderDefaultsWarnings.BuilderDefaultsWarningsBuilder items(final java.util.Collection<? extends String> items) {
- if (items == null) throw new java.lang.NullPointerException("items cannot be null");
+ 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;
diff --git a/test/transform/resource/after-delombok/BuilderSingularAnnotatedTypes.java b/test/transform/resource/after-delombok/BuilderSingularAnnotatedTypes.java
index 4cc247ef..f6fa22de 100644
--- a/test/transform/resource/after-delombok/BuilderSingularAnnotatedTypes.java
+++ b/test/transform/resource/after-delombok/BuilderSingularAnnotatedTypes.java
@@ -36,7 +36,9 @@ class BuilderSingularAnnotatedTypes {
}
@java.lang.SuppressWarnings("all")
public BuilderSingularAnnotatedTypes.BuilderSingularAnnotatedTypesBuilder foos(final java.util.Collection<? extends @MyAnnotation @NonNull String> foos) {
- if (foos == null) throw new java.lang.NullPointerException("foos cannot be null");
+ if (foos == null) {
+ throw new java.lang.NullPointerException("foos cannot be null");
+ }
if (this.foos == null) this.foos = new java.util.ArrayList<@MyAnnotation @NonNull String>();
this.foos.addAll(foos);
return this;
@@ -64,7 +66,9 @@ class BuilderSingularAnnotatedTypes {
}
@java.lang.SuppressWarnings("all")
public BuilderSingularAnnotatedTypes.BuilderSingularAnnotatedTypesBuilder bars(final java.util.Map<? extends @MyAnnotation @NonNull String, ? extends @MyAnnotation @NonNull Integer> bars) {
- if (bars == null) throw new java.lang.NullPointerException("bars cannot be null");
+ if (bars == null) {
+ throw new java.lang.NullPointerException("bars cannot be null");
+ }
if (this.bars$key == null) {
this.bars$key = new java.util.ArrayList<@MyAnnotation @NonNull String>();
this.bars$value = new java.util.ArrayList<@MyAnnotation @NonNull Integer>();
diff --git a/test/transform/resource/after-delombok/BuilderSingularAnnotatedTypesWithSetterPrefix.java b/test/transform/resource/after-delombok/BuilderSingularAnnotatedTypesWithSetterPrefix.java
index 90cc5570..6dbbeee4 100644
--- a/test/transform/resource/after-delombok/BuilderSingularAnnotatedTypesWithSetterPrefix.java
+++ b/test/transform/resource/after-delombok/BuilderSingularAnnotatedTypesWithSetterPrefix.java
@@ -36,7 +36,9 @@ class BuilderSingularAnnotatedTypesWithSetterPrefix {
}
@java.lang.SuppressWarnings("all")
public BuilderSingularAnnotatedTypesWithSetterPrefix.BuilderSingularAnnotatedTypesWithSetterPrefixBuilder withFoos(final java.util.Collection<? extends @MyAnnotation @NonNull String> foos) {
- if (foos == null) throw new java.lang.NullPointerException("foos cannot be null");
+ if (foos == null) {
+ throw new java.lang.NullPointerException("foos cannot be null");
+ }
if (this.foos == null) this.foos = new java.util.ArrayList<@MyAnnotation @NonNull String>();
this.foos.addAll(foos);
return this;
@@ -64,7 +66,9 @@ class BuilderSingularAnnotatedTypesWithSetterPrefix {
}
@java.lang.SuppressWarnings("all")
public BuilderSingularAnnotatedTypesWithSetterPrefix.BuilderSingularAnnotatedTypesWithSetterPrefixBuilder withBars(final java.util.Map<? extends @MyAnnotation @NonNull String, ? extends @MyAnnotation @NonNull Integer> bars) {
- if (bars == null) throw new java.lang.NullPointerException("bars cannot be null");
+ if (bars == null) {
+ throw new java.lang.NullPointerException("bars cannot be null");
+ }
if (this.bars$key == null) {
this.bars$key = new java.util.ArrayList<@MyAnnotation @NonNull String>();
this.bars$value = new java.util.ArrayList<@MyAnnotation @NonNull Integer>();
diff --git a/test/transform/resource/after-delombok/BuilderSingularGuavaListsSets.java b/test/transform/resource/after-delombok/BuilderSingularGuavaListsSets.java
index 650ab2fd..32b7c084 100644
--- a/test/transform/resource/after-delombok/BuilderSingularGuavaListsSets.java
+++ b/test/transform/resource/after-delombok/BuilderSingularGuavaListsSets.java
@@ -41,7 +41,9 @@ class BuilderSingularGuavaListsSets<T> {
}
@java.lang.SuppressWarnings("all")
public BuilderSingularGuavaListsSets.BuilderSingularGuavaListsSetsBuilder<T> cards(final java.lang.Iterable<? extends T> cards) {
- if (cards == null) throw new java.lang.NullPointerException("cards cannot be null");
+ if (cards == null) {
+ throw new java.lang.NullPointerException("cards cannot be null");
+ }
if (this.cards == null) this.cards = com.google.common.collect.ImmutableList.builder();
this.cards.addAll(cards);
return this;
@@ -59,7 +61,9 @@ class BuilderSingularGuavaListsSets<T> {
}
@java.lang.SuppressWarnings("all")
public BuilderSingularGuavaListsSets.BuilderSingularGuavaListsSetsBuilder<T> frogs(final java.lang.Iterable<? extends Number> frogs) {
- if (frogs == null) throw new java.lang.NullPointerException("frogs cannot be null");
+ if (frogs == null) {
+ throw new java.lang.NullPointerException("frogs cannot be null");
+ }
if (this.frogs == null) this.frogs = com.google.common.collect.ImmutableList.builder();
this.frogs.addAll(frogs);
return this;
@@ -77,7 +81,9 @@ class BuilderSingularGuavaListsSets<T> {
}
@java.lang.SuppressWarnings("all")
public BuilderSingularGuavaListsSets.BuilderSingularGuavaListsSetsBuilder<T> rawSet(final java.lang.Iterable<?> rawSet) {
- if (rawSet == null) throw new java.lang.NullPointerException("rawSet cannot be null");
+ if (rawSet == null) {
+ throw new java.lang.NullPointerException("rawSet cannot be null");
+ }
if (this.rawSet == null) this.rawSet = com.google.common.collect.ImmutableSet.builder();
this.rawSet.addAll(rawSet);
return this;
@@ -95,7 +101,9 @@ class BuilderSingularGuavaListsSets<T> {
}
@java.lang.SuppressWarnings("all")
public BuilderSingularGuavaListsSets.BuilderSingularGuavaListsSetsBuilder<T> passes(final java.lang.Iterable<? extends String> passes) {
- if (passes == null) throw new java.lang.NullPointerException("passes cannot be null");
+ if (passes == null) {
+ throw new java.lang.NullPointerException("passes cannot be null");
+ }
if (this.passes == null) this.passes = com.google.common.collect.ImmutableSortedSet.naturalOrder();
this.passes.addAll(passes);
return this;
@@ -113,7 +121,9 @@ class BuilderSingularGuavaListsSets<T> {
}
@java.lang.SuppressWarnings("all")
public BuilderSingularGuavaListsSets.BuilderSingularGuavaListsSetsBuilder<T> users(final com.google.common.collect.Table<? extends Number, ? extends Number, ? extends String> users) {
- if (users == null) throw new java.lang.NullPointerException("users cannot be null");
+ if (users == null) {
+ throw new java.lang.NullPointerException("users cannot be null");
+ }
if (this.users == null) this.users = com.google.common.collect.ImmutableTable.builder();
this.users.putAll(users);
return this;
diff --git a/test/transform/resource/after-delombok/BuilderSingularGuavaMaps.java b/test/transform/resource/after-delombok/BuilderSingularGuavaMaps.java
index 6af1bf8d..9e3c6c15 100644
--- a/test/transform/resource/after-delombok/BuilderSingularGuavaMaps.java
+++ b/test/transform/resource/after-delombok/BuilderSingularGuavaMaps.java
@@ -31,7 +31,9 @@ class BuilderSingularGuavaMaps<K, V> {
}
@java.lang.SuppressWarnings("all")
public BuilderSingularGuavaMaps.BuilderSingularGuavaMapsBuilder<K, V> battleaxes(final java.util.Map<? extends K, ? extends V> battleaxes) {
- if (battleaxes == null) throw new java.lang.NullPointerException("battleaxes cannot be null");
+ if (battleaxes == null) {
+ throw new java.lang.NullPointerException("battleaxes cannot be null");
+ }
if (this.battleaxes == null) this.battleaxes = com.google.common.collect.ImmutableMap.builder();
this.battleaxes.putAll(battleaxes);
return this;
@@ -49,7 +51,9 @@ class BuilderSingularGuavaMaps<K, V> {
}
@java.lang.SuppressWarnings("all")
public BuilderSingularGuavaMaps.BuilderSingularGuavaMapsBuilder<K, V> vertices(final java.util.Map<? extends Integer, ? extends V> vertices) {
- if (vertices == null) throw new java.lang.NullPointerException("vertices cannot be null");
+ if (vertices == null) {
+ throw new java.lang.NullPointerException("vertices cannot be null");
+ }
if (this.vertices == null) this.vertices = com.google.common.collect.ImmutableSortedMap.naturalOrder();
this.vertices.putAll(vertices);
return this;
@@ -67,7 +71,9 @@ class BuilderSingularGuavaMaps<K, V> {
}
@java.lang.SuppressWarnings("all")
public BuilderSingularGuavaMaps.BuilderSingularGuavaMapsBuilder<K, V> rawMap(final java.util.Map<?, ?> rawMap) {
- if (rawMap == null) throw new java.lang.NullPointerException("rawMap cannot be null");
+ if (rawMap == null) {
+ throw new java.lang.NullPointerException("rawMap cannot be null");
+ }
if (this.rawMap == null) this.rawMap = com.google.common.collect.ImmutableBiMap.builder();
this.rawMap.putAll(rawMap);
return this;
diff --git a/test/transform/resource/after-delombok/BuilderSingularLists.java b/test/transform/resource/after-delombok/BuilderSingularLists.java
index 43eb7702..f722dfcd 100644
--- a/test/transform/resource/after-delombok/BuilderSingularLists.java
+++ b/test/transform/resource/after-delombok/BuilderSingularLists.java
@@ -30,7 +30,9 @@ class BuilderSingularLists<T> {
}
@java.lang.SuppressWarnings("all")
public BuilderSingularLists.BuilderSingularListsBuilder<T> children(final java.util.Collection<? extends T> children) {
- if (children == null) throw new java.lang.NullPointerException("children cannot be null");
+ if (children == null) {
+ throw new java.lang.NullPointerException("children cannot be null");
+ }
if (this.children == null) this.children = new java.util.ArrayList<T>();
this.children.addAll(children);
return this;
@@ -48,7 +50,9 @@ class BuilderSingularLists<T> {
}
@java.lang.SuppressWarnings("all")
public BuilderSingularLists.BuilderSingularListsBuilder<T> scarves(final java.util.Collection<? extends Number> scarves) {
- if (scarves == null) throw new java.lang.NullPointerException("scarves cannot be null");
+ if (scarves == null) {
+ throw new java.lang.NullPointerException("scarves cannot be null");
+ }
if (this.scarves == null) this.scarves = new java.util.ArrayList<Number>();
this.scarves.addAll(scarves);
return this;
@@ -66,7 +70,9 @@ class BuilderSingularLists<T> {
}
@java.lang.SuppressWarnings("all")
public BuilderSingularLists.BuilderSingularListsBuilder<T> rawList(final java.util.Collection<?> rawList) {
- if (rawList == null) throw new java.lang.NullPointerException("rawList cannot be null");
+ if (rawList == null) {
+ throw new java.lang.NullPointerException("rawList cannot be null");
+ }
if (this.rawList == null) this.rawList = new java.util.ArrayList<java.lang.Object>();
this.rawList.addAll(rawList);
return this;
diff --git a/test/transform/resource/after-delombok/BuilderSingularMaps.java b/test/transform/resource/after-delombok/BuilderSingularMaps.java
index d10dd090..f6073141 100644
--- a/test/transform/resource/after-delombok/BuilderSingularMaps.java
+++ b/test/transform/resource/after-delombok/BuilderSingularMaps.java
@@ -46,7 +46,9 @@ class BuilderSingularMaps<K, V> {
}
@SuppressWarnings("all")
public BuilderSingularMaps.BuilderSingularMapsBuilder<K, V> women(java.util.Map<? extends K, ? extends V> women) {
- if (women == null) throw new NullPointerException("women cannot be null");
+ if (women == null) {
+ throw new NullPointerException("women cannot be null");
+ }
if (this.women$key == null) {
this.women$key = new java.util.ArrayList<K>();
this.women$value = new java.util.ArrayList<V>();
@@ -77,7 +79,9 @@ class BuilderSingularMaps<K, V> {
}
@SuppressWarnings("all")
public BuilderSingularMaps.BuilderSingularMapsBuilder<K, V> men(java.util.Map<? extends K, ? extends Number> men) {
- if (men == null) throw new NullPointerException("men cannot be null");
+ if (men == null) {
+ throw new NullPointerException("men cannot be null");
+ }
if (this.men$key == null) {
this.men$key = new java.util.ArrayList<K>();
this.men$value = new java.util.ArrayList<Number>();
@@ -108,7 +112,9 @@ class BuilderSingularMaps<K, V> {
}
@SuppressWarnings("all")
public BuilderSingularMaps.BuilderSingularMapsBuilder<K, V> rawMap(java.util.Map<?, ?> rawMap) {
- if (rawMap == null) throw new NullPointerException("rawMap cannot be null");
+ if (rawMap == null) {
+ throw new NullPointerException("rawMap cannot be null");
+ }
if (this.rawMap$key == null) {
this.rawMap$key = new java.util.ArrayList<Object>();
this.rawMap$value = new java.util.ArrayList<Object>();
@@ -139,7 +145,9 @@ class BuilderSingularMaps<K, V> {
}
@SuppressWarnings("all")
public BuilderSingularMaps.BuilderSingularMapsBuilder<K, V> stringMap(java.util.Map<? extends String, ? extends V> stringMap) {
- if (stringMap == null) throw new NullPointerException("stringMap cannot be null");
+ if (stringMap == null) {
+ throw new NullPointerException("stringMap cannot be null");
+ }
if (this.stringMap$key == null) {
this.stringMap$key = new java.util.ArrayList<String>();
this.stringMap$value = new java.util.ArrayList<V>();
diff --git a/test/transform/resource/after-delombok/BuilderSingularMapsWithSetterPrefix.java b/test/transform/resource/after-delombok/BuilderSingularMapsWithSetterPrefix.java
index baa8f311..b3e92fb0 100644
--- a/test/transform/resource/after-delombok/BuilderSingularMapsWithSetterPrefix.java
+++ b/test/transform/resource/after-delombok/BuilderSingularMapsWithSetterPrefix.java
@@ -46,15 +46,16 @@ class BuilderSingularMapsWithSetterPrefix<K, V> {
}
@SuppressWarnings("all")
public BuilderSingularMapsWithSetterPrefix.BuilderSingularMapsWithSetterPrefixBuilder<K, V> withWomen(java.util.Map<? extends K, ? extends V> women) {
- if (women != null) {
- if (this.women$key == null) {
- this.women$key = new java.util.ArrayList<K>();
- this.women$value = new java.util.ArrayList<V>();
- }
- for (java.util.Map.Entry<? extends K, ? extends V> $lombokEntry : women.entrySet()) {
- this.women$key.add($lombokEntry.getKey());
- this.women$value.add($lombokEntry.getValue());
- }
+ if (women == null) {
+ throw new NullPointerException("women cannot be null");
+ }
+ if (this.women$key == null) {
+ this.women$key = new java.util.ArrayList<K>();
+ this.women$value = new java.util.ArrayList<V>();
+ }
+ for (java.util.Map.Entry<? extends K, ? extends V> $lombokEntry : women.entrySet()) {
+ this.women$key.add($lombokEntry.getKey());
+ this.women$value.add($lombokEntry.getValue());
}
return this;
}
@@ -78,15 +79,16 @@ class BuilderSingularMapsWithSetterPrefix<K, V> {
}
@SuppressWarnings("all")
public BuilderSingularMapsWithSetterPrefix.BuilderSingularMapsWithSetterPrefixBuilder<K, V> withMen(java.util.Map<? extends K, ? extends Number> men) {
- if (men != null) {
- if (this.men$key == null) {
- this.men$key = new java.util.ArrayList<K>();
- this.men$value = new java.util.ArrayList<Number>();
- }
- for (java.util.Map.Entry<? extends K, ? extends Number> $lombokEntry : men.entrySet()) {
- this.men$key.add($lombokEntry.getKey());
- this.men$value.add($lombokEntry.getValue());
- }
+ if (men == null) {
+ throw new NullPointerException("men cannot be null");
+ }
+ if (this.men$key == null) {
+ this.men$key = new java.util.ArrayList<K>();
+ this.men$value = new java.util.ArrayList<Number>();
+ }
+ for (java.util.Map.Entry<? extends K, ? extends Number> $lombokEntry : men.entrySet()) {
+ this.men$key.add($lombokEntry.getKey());
+ this.men$value.add($lombokEntry.getValue());
}
return this;
}
@@ -142,15 +144,16 @@ class BuilderSingularMapsWithSetterPrefix<K, V> {
}
@SuppressWarnings("all")
public BuilderSingularMapsWithSetterPrefix.BuilderSingularMapsWithSetterPrefixBuilder<K, V> withStringMap(java.util.Map<? extends String, ? extends V> stringMap) {
- if (stringMap != null) {
- if (this.stringMap$key == null) {
- this.stringMap$key = new java.util.ArrayList<String>();
- this.stringMap$value = new java.util.ArrayList<V>();
- }
- for (java.util.Map.Entry<? extends String, ? extends V> $lombokEntry : stringMap.entrySet()) {
- this.stringMap$key.add($lombokEntry.getKey());
- this.stringMap$value.add($lombokEntry.getValue());
- }
+ if (stringMap == null) {
+ throw new NullPointerException("stringMap cannot be null");
+ }
+ if (this.stringMap$key == null) {
+ this.stringMap$key = new java.util.ArrayList<String>();
+ this.stringMap$value = new java.util.ArrayList<V>();
+ }
+ for (java.util.Map.Entry<? extends String, ? extends V> $lombokEntry : stringMap.entrySet()) {
+ this.stringMap$key.add($lombokEntry.getKey());
+ this.stringMap$value.add($lombokEntry.getValue());
}
return this;
}
diff --git a/test/transform/resource/after-delombok/BuilderSingularNoAuto.java b/test/transform/resource/after-delombok/BuilderSingularNoAuto.java
index 6b2fd5b2..ba6ddc52 100644
--- a/test/transform/resource/after-delombok/BuilderSingularNoAuto.java
+++ b/test/transform/resource/after-delombok/BuilderSingularNoAuto.java
@@ -28,7 +28,9 @@ class BuilderSingularNoAuto {
}
@java.lang.SuppressWarnings("all")
public BuilderSingularNoAuto.BuilderSingularNoAutoBuilder things(final java.util.Collection<? extends String> things) {
- if (things == null) throw new java.lang.NullPointerException("things cannot be null");
+ 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;
@@ -46,7 +48,9 @@ class BuilderSingularNoAuto {
}
@java.lang.SuppressWarnings("all")
public BuilderSingularNoAuto.BuilderSingularNoAutoBuilder widgets(final java.util.Collection<? extends String> widgets) {
- if (widgets == null) throw new java.lang.NullPointerException("widgets cannot be null");
+ 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;
@@ -64,7 +68,9 @@ class BuilderSingularNoAuto {
}
@java.lang.SuppressWarnings("all")
public BuilderSingularNoAuto.BuilderSingularNoAutoBuilder items(final java.util.Collection<? extends String> items) {
- if (items == null) throw new java.lang.NullPointerException("items cannot be null");
+ 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;
diff --git a/test/transform/resource/after-delombok/BuilderSingularNoAutoWithSetterPrefix.java b/test/transform/resource/after-delombok/BuilderSingularNoAutoWithSetterPrefix.java
index a023b82a..857348d3 100644
--- a/test/transform/resource/after-delombok/BuilderSingularNoAutoWithSetterPrefix.java
+++ b/test/transform/resource/after-delombok/BuilderSingularNoAutoWithSetterPrefix.java
@@ -28,7 +28,9 @@ 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 (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;
@@ -46,7 +48,9 @@ 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 (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;
@@ -64,7 +68,9 @@ 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 (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;
diff --git a/test/transform/resource/after-delombok/BuilderSingularNullBehavior1.java b/test/transform/resource/after-delombok/BuilderSingularNullBehavior1.java
index 7b4e0a29..55420ac2 100644
--- a/test/transform/resource/after-delombok/BuilderSingularNullBehavior1.java
+++ b/test/transform/resource/after-delombok/BuilderSingularNullBehavior1.java
@@ -1,17 +1,12 @@
import java.util.List;
import java.util.Collection;
-import lombok.Singular.NullCollectionBehavior;
class BuilderSingularNullBehavior1 {
private List<String> names;
private List<String> locations;
- private List<String> whatevers;
- private List<String> doohickeys;
@java.lang.SuppressWarnings("all")
- BuilderSingularNullBehavior1(final List<String> names, final List<String> locations, final List<String> whatevers, final List<String> doohickeys) {
+ BuilderSingularNullBehavior1(final List<String> names, final List<String> locations) {
this.names = names;
this.locations = locations;
- this.whatevers = whatevers;
- this.doohickeys = doohickeys;
}
@java.lang.SuppressWarnings("all")
public static class BuilderSingularNullBehavior1Builder {
@@ -20,10 +15,6 @@ class BuilderSingularNullBehavior1 {
@java.lang.SuppressWarnings("all")
private java.util.ArrayList<String> locations;
@java.lang.SuppressWarnings("all")
- private java.util.ArrayList<String> whatevers;
- @java.lang.SuppressWarnings("all")
- private java.util.ArrayList<String> doohickeys;
- @java.lang.SuppressWarnings("all")
BuilderSingularNullBehavior1Builder() {
}
@java.lang.SuppressWarnings("all")
@@ -33,8 +24,8 @@ class BuilderSingularNullBehavior1 {
return this;
}
@java.lang.SuppressWarnings("all")
- public BuilderSingularNullBehavior1.BuilderSingularNullBehavior1Builder names(final java.util.Collection<? extends String> names) {
- if (names == null) throw new java.lang.NullPointerException("names cannot be null");
+ public BuilderSingularNullBehavior1.BuilderSingularNullBehavior1Builder names(final java.util.@org.checkerframework.checker.nullness.qual.NonNull Collection<? extends String> names) {
+ assert names != null : "names cannot be null";
if (this.names == null) this.names = new java.util.ArrayList<String>();
this.names.addAll(names);
return this;
@@ -51,10 +42,11 @@ class BuilderSingularNullBehavior1 {
return this;
}
@java.lang.SuppressWarnings("all")
- public BuilderSingularNullBehavior1.BuilderSingularNullBehavior1Builder locations(final java.util.Collection<? extends String> locations) {
- java.util.Objects.requireNonNull(locations, "locations cannot be null");
- if (this.locations == null) this.locations = new java.util.ArrayList<String>();
- this.locations.addAll(locations);
+ public BuilderSingularNullBehavior1.BuilderSingularNullBehavior1Builder locations(final java.util.@org.checkerframework.checker.nullness.qual.Nullable Collection<? extends String> locations) {
+ if (locations != null) {
+ if (this.locations == null) this.locations = new java.util.ArrayList<String>();
+ this.locations.addAll(locations);
+ }
return this;
}
@java.lang.SuppressWarnings("all")
@@ -63,43 +55,6 @@ class BuilderSingularNullBehavior1 {
return this;
}
@java.lang.SuppressWarnings("all")
- public BuilderSingularNullBehavior1.BuilderSingularNullBehavior1Builder whatever(final String whatever) {
- if (this.whatevers == null) this.whatevers = new java.util.ArrayList<String>();
- this.whatevers.add(whatever);
- return this;
- }
- @java.lang.SuppressWarnings("all")
- public BuilderSingularNullBehavior1.BuilderSingularNullBehavior1Builder whatevers(final java.util.Collection<? extends String> whatevers) {
- com.google.common.base.Preconditions.checkNotNull(whatevers, "whatevers cannot be null");
- if (this.whatevers == null) this.whatevers = new java.util.ArrayList<String>();
- this.whatevers.addAll(whatevers);
- return this;
- }
- @java.lang.SuppressWarnings("all")
- public BuilderSingularNullBehavior1.BuilderSingularNullBehavior1Builder clearWhatevers() {
- if (this.whatevers != null) this.whatevers.clear();
- return this;
- }
- @java.lang.SuppressWarnings("all")
- public BuilderSingularNullBehavior1.BuilderSingularNullBehavior1Builder doohickey(final String doohickey) {
- if (this.doohickeys == null) this.doohickeys = new java.util.ArrayList<String>();
- this.doohickeys.add(doohickey);
- return this;
- }
- @java.lang.SuppressWarnings("all")
- public BuilderSingularNullBehavior1.BuilderSingularNullBehavior1Builder doohickeys(final java.util.Collection<? extends String> doohickeys) {
- if (doohickeys != null) {
- if (this.doohickeys == null) this.doohickeys = new java.util.ArrayList<String>();
- this.doohickeys.addAll(doohickeys);
- }
- return this;
- }
- @java.lang.SuppressWarnings("all")
- public BuilderSingularNullBehavior1.BuilderSingularNullBehavior1Builder clearDoohickeys() {
- if (this.doohickeys != null) this.doohickeys.clear();
- return this;
- }
- @java.lang.SuppressWarnings("all")
public BuilderSingularNullBehavior1 build() {
java.util.List<String> names;
switch (this.names == null ? 0 : this.names.size()) {
@@ -123,38 +78,16 @@ class BuilderSingularNullBehavior1 {
default:
locations = java.util.Collections.unmodifiableList(new java.util.ArrayList<String>(this.locations));
}
- java.util.List<String> whatevers;
- switch (this.whatevers == null ? 0 : this.whatevers.size()) {
- case 0:
- whatevers = java.util.Collections.emptyList();
- break;
- case 1:
- whatevers = java.util.Collections.singletonList(this.whatevers.get(0));
- break;
- default:
- whatevers = java.util.Collections.unmodifiableList(new java.util.ArrayList<String>(this.whatevers));
- }
- java.util.List<String> doohickeys;
- switch (this.doohickeys == null ? 0 : this.doohickeys.size()) {
- case 0:
- doohickeys = java.util.Collections.emptyList();
- break;
- case 1:
- doohickeys = java.util.Collections.singletonList(this.doohickeys.get(0));
- break;
- default:
- doohickeys = java.util.Collections.unmodifiableList(new java.util.ArrayList<String>(this.doohickeys));
- }
- return new BuilderSingularNullBehavior1(names, locations, whatevers, doohickeys);
+ return new BuilderSingularNullBehavior1(names, locations);
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
- public java.lang.String toString() {
- return "BuilderSingularNullBehavior1.BuilderSingularNullBehavior1Builder(names=" + this.names + ", locations=" + this.locations + ", whatevers=" + this.whatevers + ", doohickeys=" + this.doohickeys + ")";
+ public java.lang.@org.checkerframework.checker.nullness.qual.NonNull String toString() {
+ return "BuilderSingularNullBehavior1.BuilderSingularNullBehavior1Builder(names=" + this.names + ", locations=" + this.locations + ")";
}
}
@java.lang.SuppressWarnings("all")
public static BuilderSingularNullBehavior1.BuilderSingularNullBehavior1Builder builder() {
return new BuilderSingularNullBehavior1.BuilderSingularNullBehavior1Builder();
}
-} \ No newline at end of file
+}
diff --git a/test/transform/resource/after-delombok/BuilderSingularNullBehavior2.java b/test/transform/resource/after-delombok/BuilderSingularNullBehavior2.java
index f62ebd10..ba70002b 100644
--- a/test/transform/resource/after-delombok/BuilderSingularNullBehavior2.java
+++ b/test/transform/resource/after-delombok/BuilderSingularNullBehavior2.java
@@ -1,20 +1,15 @@
import java.util.List;
-import lombok.Singular.NullCollectionBehavior;
class BuilderSingularNullBehavior2 {
private List<String> locations;
- private List<String> doohickeys;
@java.lang.SuppressWarnings("all")
- BuilderSingularNullBehavior2(final List<String> locations, final List<String> doohickeys) {
+ BuilderSingularNullBehavior2(final List<String> locations) {
this.locations = locations;
- this.doohickeys = doohickeys;
}
@java.lang.SuppressWarnings("all")
public static class BuilderSingularNullBehavior2Builder {
@java.lang.SuppressWarnings("all")
private java.util.ArrayList<String> locations;
@java.lang.SuppressWarnings("all")
- private java.util.ArrayList<String> doohickeys;
- @java.lang.SuppressWarnings("all")
BuilderSingularNullBehavior2Builder() {
}
@java.lang.SuppressWarnings("all")
@@ -24,7 +19,7 @@ class BuilderSingularNullBehavior2 {
return this;
}
@java.lang.SuppressWarnings("all")
- public BuilderSingularNullBehavior2.BuilderSingularNullBehavior2Builder locations(final java.util.@org.checkerframework.checker.nullness.qual.NonNull Collection<? extends String> locations) {
+ public BuilderSingularNullBehavior2.BuilderSingularNullBehavior2Builder locations(@org.springframework.lang.NonNull final java.util.Collection<? extends String> locations) {
java.util.Objects.requireNonNull(locations, "locations cannot be null");
if (this.locations == null) this.locations = new java.util.ArrayList<String>();
this.locations.addAll(locations);
@@ -35,29 +30,6 @@ class BuilderSingularNullBehavior2 {
if (this.locations != null) this.locations.clear();
return this;
}
-
- @java.lang.SuppressWarnings("all")
- public BuilderSingularNullBehavior2.BuilderSingularNullBehavior2Builder doohickey(final String doohickey) {
- if (this.doohickeys == null) this.doohickeys = new java.util.ArrayList<String>();
- this.doohickeys.add(doohickey);
- return this;
- }
-
- @java.lang.SuppressWarnings("all")
- public BuilderSingularNullBehavior2.BuilderSingularNullBehavior2Builder doohickeys(final java.util.@org.checkerframework.checker.nullness.qual.Nullable Collection<? extends String> doohickeys) {
- if (doohickeys != null) {
- if (this.doohickeys == null) this.doohickeys = new java.util.ArrayList<String>();
- this.doohickeys.addAll(doohickeys);
- }
- return this;
- }
-
- @java.lang.SuppressWarnings("all")
- public BuilderSingularNullBehavior2.BuilderSingularNullBehavior2Builder clearDoohickeys() {
- if (this.doohickeys != null) this.doohickeys.clear();
- return this;
- }
-
@java.lang.SuppressWarnings("all")
public BuilderSingularNullBehavior2 build() {
java.util.List<String> locations;
@@ -71,27 +43,15 @@ class BuilderSingularNullBehavior2 {
default:
locations = java.util.Collections.unmodifiableList(new java.util.ArrayList<String>(this.locations));
}
- java.util.List<String> doohickeys;
- switch (this.doohickeys == null ? 0 : this.doohickeys.size()) {
- case 0:
- doohickeys = java.util.Collections.emptyList();
- break;
- case 1:
- doohickeys = java.util.Collections.singletonList(this.doohickeys.get(0));
- break;
- default:
- doohickeys = java.util.Collections.unmodifiableList(new java.util.ArrayList<String>(this.doohickeys));
- }
- return new BuilderSingularNullBehavior2(locations, doohickeys);
+ return new BuilderSingularNullBehavior2(locations);
}
-
+ @org.springframework.lang.NonNull
@java.lang.Override
@java.lang.SuppressWarnings("all")
- public java.lang.@org.checkerframework.checker.nullness.qual.NonNull String toString() {
- return "BuilderSingularNullBehavior2.BuilderSingularNullBehavior2Builder(locations=" + this.locations + ", doohickeys=" + this.doohickeys + ")";
+ public java.lang.String toString() {
+ return "BuilderSingularNullBehavior2.BuilderSingularNullBehavior2Builder(locations=" + this.locations + ")";
}
}
-
@java.lang.SuppressWarnings("all")
public static BuilderSingularNullBehavior2.BuilderSingularNullBehavior2Builder builder() {
return new BuilderSingularNullBehavior2.BuilderSingularNullBehavior2Builder();
diff --git a/test/transform/resource/after-delombok/BuilderSingularRedirectToGuava.java b/test/transform/resource/after-delombok/BuilderSingularRedirectToGuava.java
index 9ee6823e..a718d7cd 100644
--- a/test/transform/resource/after-delombok/BuilderSingularRedirectToGuava.java
+++ b/test/transform/resource/after-delombok/BuilderSingularRedirectToGuava.java
@@ -30,7 +30,9 @@ class BuilderSingularRedirectToGuava {
}
@java.lang.SuppressWarnings("all")
public BuilderSingularRedirectToGuava.BuilderSingularRedirectToGuavaBuilder dangerMice(final java.lang.Iterable<? extends String> dangerMice) {
- if (dangerMice == null) throw new java.lang.NullPointerException("dangerMice cannot be null");
+ if (dangerMice == null) {
+ throw new java.lang.NullPointerException("dangerMice cannot be null");
+ }
if (this.dangerMice == null) this.dangerMice = com.google.common.collect.ImmutableSet.builder();
this.dangerMice.addAll(dangerMice);
return this;
@@ -48,7 +50,9 @@ class BuilderSingularRedirectToGuava {
}
@java.lang.SuppressWarnings("all")
public BuilderSingularRedirectToGuava.BuilderSingularRedirectToGuavaBuilder things(final java.util.Map<? extends Integer, ? extends Number> things) {
- if (things == null) throw new java.lang.NullPointerException("things cannot be null");
+ if (things == null) {
+ throw new java.lang.NullPointerException("things cannot be null");
+ }
if (this.things == null) this.things = com.google.common.collect.ImmutableSortedMap.naturalOrder();
this.things.putAll(things);
return this;
@@ -66,7 +70,9 @@ class BuilderSingularRedirectToGuava {
}
@java.lang.SuppressWarnings("all")
public BuilderSingularRedirectToGuava.BuilderSingularRedirectToGuavaBuilder doohickeys(final java.lang.Iterable<? extends Class<?>> doohickeys) {
- if (doohickeys == null) throw new java.lang.NullPointerException("doohickeys cannot be null");
+ if (doohickeys == null) {
+ throw new java.lang.NullPointerException("doohickeys cannot be null");
+ }
if (this.doohickeys == null) this.doohickeys = com.google.common.collect.ImmutableList.builder();
this.doohickeys.addAll(doohickeys);
return this;
diff --git a/test/transform/resource/after-delombok/BuilderSingularSets.java b/test/transform/resource/after-delombok/BuilderSingularSets.java
index 7b905c8c..25f106e9 100644
--- a/test/transform/resource/after-delombok/BuilderSingularSets.java
+++ b/test/transform/resource/after-delombok/BuilderSingularSets.java
@@ -34,7 +34,9 @@ class BuilderSingularSets<T> {
}
@java.lang.SuppressWarnings("all")
public BuilderSingularSets.BuilderSingularSetsBuilder<T> dangerMice(final java.util.Collection<? extends T> dangerMice) {
- if (dangerMice == null) throw new java.lang.NullPointerException("dangerMice cannot be null");
+ if (dangerMice == null) {
+ throw new java.lang.NullPointerException("dangerMice cannot be null");
+ }
if (this.dangerMice == null) this.dangerMice = new java.util.ArrayList<T>();
this.dangerMice.addAll(dangerMice);
return this;
@@ -52,7 +54,9 @@ class BuilderSingularSets<T> {
}
@java.lang.SuppressWarnings("all")
public BuilderSingularSets.BuilderSingularSetsBuilder<T> octopodes(final java.util.Collection<? extends Number> octopodes) {
- if (octopodes == null) throw new java.lang.NullPointerException("octopodes cannot be null");
+ if (octopodes == null) {
+ throw new java.lang.NullPointerException("octopodes cannot be null");
+ }
if (this.octopodes == null) this.octopodes = new java.util.ArrayList<Number>();
this.octopodes.addAll(octopodes);
return this;
@@ -70,7 +74,9 @@ class BuilderSingularSets<T> {
}
@java.lang.SuppressWarnings("all")
public BuilderSingularSets.BuilderSingularSetsBuilder<T> rawSet(final java.util.Collection<?> rawSet) {
- if (rawSet == null) throw new java.lang.NullPointerException("rawSet cannot be null");
+ if (rawSet == null) {
+ throw new java.lang.NullPointerException("rawSet cannot be null");
+ }
if (this.rawSet == null) this.rawSet = new java.util.ArrayList<java.lang.Object>();
this.rawSet.addAll(rawSet);
return this;
@@ -88,7 +94,9 @@ class BuilderSingularSets<T> {
}
@java.lang.SuppressWarnings("all")
public BuilderSingularSets.BuilderSingularSetsBuilder<T> stringSet(final java.util.Collection<? extends String> stringSet) {
- if (stringSet == null) throw new java.lang.NullPointerException("stringSet cannot be null");
+ if (stringSet == null) {
+ throw new java.lang.NullPointerException("stringSet cannot be null");
+ }
if (this.stringSet == null) this.stringSet = new java.util.ArrayList<String>();
this.stringSet.addAll(stringSet);
return this;
diff --git a/test/transform/resource/after-delombok/BuilderSingularSetsWithSetterPrefix.java b/test/transform/resource/after-delombok/BuilderSingularSetsWithSetterPrefix.java
index 4a025624..a3d3c621 100644
--- a/test/transform/resource/after-delombok/BuilderSingularSetsWithSetterPrefix.java
+++ b/test/transform/resource/after-delombok/BuilderSingularSetsWithSetterPrefix.java
@@ -34,7 +34,9 @@ class BuilderSingularSetsWithSetterPrefix<T> {
}
@java.lang.SuppressWarnings("all")
public BuilderSingularSetsWithSetterPrefix.BuilderSingularSetsWithSetterPrefixBuilder<T> withDangerMice(final java.util.Collection<? extends T> dangerMice) {
- if (dangerMice == null) throw new java.lang.NullPointerException("dangerMice cannot be null");
+ if (dangerMice == null) {
+ throw new java.lang.NullPointerException("dangerMice cannot be null");
+ }
if (this.dangerMice == null) this.dangerMice = new java.util.ArrayList<T>();
this.dangerMice.addAll(dangerMice);
return this;
@@ -52,7 +54,9 @@ class BuilderSingularSetsWithSetterPrefix<T> {
}
@java.lang.SuppressWarnings("all")
public BuilderSingularSetsWithSetterPrefix.BuilderSingularSetsWithSetterPrefixBuilder<T> withOctopodes(final java.util.Collection<? extends Number> octopodes) {
- if (octopodes == null) throw new java.lang.NullPointerException("octopodes cannot be null");
+ if (octopodes == null) {
+ throw new java.lang.NullPointerException("octopodes cannot be null");
+ }
if (this.octopodes == null) this.octopodes = new java.util.ArrayList<Number>();
this.octopodes.addAll(octopodes);
return this;
@@ -70,7 +74,9 @@ class BuilderSingularSetsWithSetterPrefix<T> {
}
@java.lang.SuppressWarnings("all")
public BuilderSingularSetsWithSetterPrefix.BuilderSingularSetsWithSetterPrefixBuilder<T> withRawSet(final java.util.Collection<?> rawSet) {
- if (rawSet == null) throw new java.lang.NullPointerException("rawSet cannot be null");
+ if (rawSet == null) {
+ throw new java.lang.NullPointerException("rawSet cannot be null");
+ }
if (this.rawSet == null) this.rawSet = new java.util.ArrayList<java.lang.Object>();
this.rawSet.addAll(rawSet);
return this;
@@ -88,7 +94,9 @@ class BuilderSingularSetsWithSetterPrefix<T> {
}
@java.lang.SuppressWarnings("all")
public BuilderSingularSetsWithSetterPrefix.BuilderSingularSetsWithSetterPrefixBuilder<T> withStringSet(final java.util.Collection<? extends String> stringSet) {
- if (stringSet == null) throw new java.lang.NullPointerException("stringSet cannot be null");
+ if (stringSet == null) {
+ throw new java.lang.NullPointerException("stringSet cannot be null");
+ }
if (this.stringSet == null) this.stringSet = new java.util.ArrayList<String>();
this.stringSet.addAll(stringSet);
return this;
diff --git a/test/transform/resource/after-delombok/BuilderSingularToBuilderWithNull.java b/test/transform/resource/after-delombok/BuilderSingularToBuilderWithNull.java
index 9a5ea7b3..fcd57a31 100644
--- a/test/transform/resource/after-delombok/BuilderSingularToBuilderWithNull.java
+++ b/test/transform/resource/after-delombok/BuilderSingularToBuilderWithNull.java
@@ -22,7 +22,9 @@ class BuilderSingularToBuilderWithNull {
}
@java.lang.SuppressWarnings("all")
public BuilderSingularToBuilderWithNull.BuilderSingularToBuilderWithNullBuilder elems(final java.util.Collection<? extends String> elems) {
- if (elems == null) throw new java.lang.NullPointerException("elems cannot be null");
+ if (elems == null) {
+ throw new java.lang.NullPointerException("elems cannot be null");
+ }
if (this.elems == null) this.elems = new java.util.ArrayList<String>();
this.elems.addAll(elems);
return this;
diff --git a/test/transform/resource/after-delombok/BuilderSingularToBuilderWithNullWithSetterPrefix.java b/test/transform/resource/after-delombok/BuilderSingularToBuilderWithNullWithSetterPrefix.java
index 1860ba60..59bc09c1 100644
--- a/test/transform/resource/after-delombok/BuilderSingularToBuilderWithNullWithSetterPrefix.java
+++ b/test/transform/resource/after-delombok/BuilderSingularToBuilderWithNullWithSetterPrefix.java
@@ -22,7 +22,9 @@ class BuilderSingularToBuilderWithNullWithSetterPrefix {
}
@java.lang.SuppressWarnings("all")
public BuilderSingularToBuilderWithNullWithSetterPrefix.BuilderSingularToBuilderWithNullWithSetterPrefixBuilder withElems(final java.util.Collection<? extends String> elems) {
- if (elems == null) throw new java.lang.NullPointerException("elems cannot be null");
+ if (elems == null) {
+ throw new java.lang.NullPointerException("elems cannot be null");
+ }
if (this.elems == null) this.elems = new java.util.ArrayList<String>();
this.elems.addAll(elems);
return this;
diff --git a/test/transform/resource/after-delombok/BuilderSingularWildcardListsWithToBuilder.java b/test/transform/resource/after-delombok/BuilderSingularWildcardListsWithToBuilder.java
index 29e53768..59cca1d3 100644
--- a/test/transform/resource/after-delombok/BuilderSingularWildcardListsWithToBuilder.java
+++ b/test/transform/resource/after-delombok/BuilderSingularWildcardListsWithToBuilder.java
@@ -25,7 +25,9 @@ class BuilderSingularWildcardListsWithToBuilder {
}
@java.lang.SuppressWarnings("all")
public BuilderSingularWildcardListsWithToBuilder.BuilderSingularWildcardListsWithToBuilderBuilder objects(final java.util.Collection<?> objects) {
- if (objects == null) throw new java.lang.NullPointerException("objects cannot be null");
+ if (objects == null) {
+ throw new java.lang.NullPointerException("objects cannot be null");
+ }
if (this.objects == null) this.objects = new java.util.ArrayList<java.lang.Object>();
this.objects.addAll(objects);
return this;
@@ -43,7 +45,9 @@ class BuilderSingularWildcardListsWithToBuilder {
}
@java.lang.SuppressWarnings("all")
public BuilderSingularWildcardListsWithToBuilder.BuilderSingularWildcardListsWithToBuilderBuilder numbers(final java.util.Collection<? extends Number> numbers) {
- if (numbers == null) throw new java.lang.NullPointerException("numbers cannot be null");
+ if (numbers == null) {
+ throw new java.lang.NullPointerException("numbers cannot be null");
+ }
if (this.numbers == null) this.numbers = new java.util.ArrayList<Number>();
this.numbers.addAll(numbers);
return this;
diff --git a/test/transform/resource/after-delombok/BuilderSingularWithPrefixes.java b/test/transform/resource/after-delombok/BuilderSingularWithPrefixes.java
index 3aa48f5d..bb6c5bfb 100644
--- a/test/transform/resource/after-delombok/BuilderSingularWithPrefixes.java
+++ b/test/transform/resource/after-delombok/BuilderSingularWithPrefixes.java
@@ -19,7 +19,9 @@ class BuilderSingularWithPrefixes {
}
@java.lang.SuppressWarnings("all")
public BuilderSingularWithPrefixes.BuilderSingularWithPrefixesBuilder elems(final java.util.Collection<? extends String> elems) {
- if (elems == null) throw new java.lang.NullPointerException("elems cannot be null");
+ if (elems == null) {
+ throw new java.lang.NullPointerException("elems cannot be null");
+ }
if (this.elems == null) this.elems = new java.util.ArrayList<String>();
this.elems.addAll(elems);
return this;
diff --git a/test/transform/resource/after-delombok/BuilderSingularWithPrefixesWithSetterPrefix.java b/test/transform/resource/after-delombok/BuilderSingularWithPrefixesWithSetterPrefix.java
index 513c3fe4..94633cfe 100644
--- a/test/transform/resource/after-delombok/BuilderSingularWithPrefixesWithSetterPrefix.java
+++ b/test/transform/resource/after-delombok/BuilderSingularWithPrefixesWithSetterPrefix.java
@@ -19,7 +19,9 @@ class BuilderSingularWithPrefixesWithSetterPrefix {
}
@java.lang.SuppressWarnings("all")
public BuilderSingularWithPrefixesWithSetterPrefix.BuilderSingularWithPrefixesWithSetterPrefixBuilder withElems(final java.util.Collection<? extends String> elems) {
- if (elems == null) throw new java.lang.NullPointerException("elems cannot be null");
+ if (elems == null) {
+ throw new java.lang.NullPointerException("elems cannot be null");
+ }
if (this.elems == null) this.elems = new java.util.ArrayList<String>();
this.elems.addAll(elems);
return this;
diff --git a/test/transform/resource/after-delombok/BuilderWithDeprecated.java b/test/transform/resource/after-delombok/BuilderWithDeprecated.java
index 584c8042..b6a09376 100644
--- a/test/transform/resource/after-delombok/BuilderWithDeprecated.java
+++ b/test/transform/resource/after-delombok/BuilderWithDeprecated.java
@@ -56,7 +56,9 @@ public class BuilderWithDeprecated {
@java.lang.Deprecated
@java.lang.SuppressWarnings("all")
public BuilderWithDeprecated.BuilderWithDeprecatedBuilder strings(final java.util.Collection<? extends String> strings) {
- if (strings == null) throw new java.lang.NullPointerException("strings cannot be null");
+ 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);
return this;
@@ -77,7 +79,9 @@ public class BuilderWithDeprecated {
@java.lang.Deprecated
@java.lang.SuppressWarnings("all")
public BuilderWithDeprecated.BuilderWithDeprecatedBuilder numbers(final java.lang.Iterable<? extends Integer> numbers) {
- if (numbers == null) throw new java.lang.NullPointerException("numbers cannot be null");
+ 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);
return this;
diff --git a/test/transform/resource/after-delombok/BuilderWithToBuilder.java b/test/transform/resource/after-delombok/BuilderWithToBuilder.java
index 20043861..d98d09f6 100644
--- a/test/transform/resource/after-delombok/BuilderWithToBuilder.java
+++ b/test/transform/resource/after-delombok/BuilderWithToBuilder.java
@@ -50,7 +50,9 @@ class BuilderWithToBuilder<T> {
}
@java.lang.SuppressWarnings("all")
public BuilderWithToBuilder.BuilderWithToBuilderBuilder<T> bars(final java.util.Collection<? extends T> bars) {
- if (bars == null) throw new java.lang.NullPointerException("bars cannot be null");
+ if (bars == null) {
+ throw new java.lang.NullPointerException("bars cannot be null");
+ }
if (this.bars == null) this.bars = new java.util.ArrayList<T>();
this.bars.addAll(bars);
return this;
diff --git a/test/transform/resource/after-delombok/CheckerFrameworkBuilder.java b/test/transform/resource/after-delombok/CheckerFrameworkBuilder.java
index fad0cf2b..ace3adad 100644
--- a/test/transform/resource/after-delombok/CheckerFrameworkBuilder.java
+++ b/test/transform/resource/after-delombok/CheckerFrameworkBuilder.java
@@ -62,7 +62,9 @@ class CheckerFrameworkBuilder {
@org.checkerframework.checker.builder.qual.ReturnsReceiver
@java.lang.SuppressWarnings("all")
public CheckerFrameworkBuilder.CheckerFrameworkBuilderBuilder names(final java.util.Collection<? extends String> names) {
- if (names == null) throw new java.lang.NullPointerException("names cannot be null");
+ if (names == null) {
+ throw new java.lang.NullPointerException("names cannot be null");
+ }
if (this.names == null) this.names = new java.util.ArrayList<String>();
this.names.addAll(names);
return this;
diff --git a/test/transform/resource/after-delombok/CheckerFrameworkSuperBuilder.java b/test/transform/resource/after-delombok/CheckerFrameworkSuperBuilder.java
index f2cde1c6..b6e0ff3c 100644
--- a/test/transform/resource/after-delombok/CheckerFrameworkSuperBuilder.java
+++ b/test/transform/resource/after-delombok/CheckerFrameworkSuperBuilder.java
@@ -58,7 +58,9 @@ class CheckerFrameworkSuperBuilder {
@org.checkerframework.checker.builder.qual.ReturnsReceiver
@java.lang.SuppressWarnings("all")
public B names(final java.util.Collection<? extends String> names) {
- if (names == null) throw new java.lang.NullPointerException("names cannot be null");
+ if (names == null) {
+ throw new java.lang.NullPointerException("names cannot be null");
+ }
if (this.names == null) this.names = new java.util.ArrayList<String>();
this.names.addAll(names);
return self();
diff --git a/test/transform/resource/after-delombok/SuperBuilderBasic.java b/test/transform/resource/after-delombok/SuperBuilderBasic.java
index 1447e9af..c347e41c 100644
--- a/test/transform/resource/after-delombok/SuperBuilderBasic.java
+++ b/test/transform/resource/after-delombok/SuperBuilderBasic.java
@@ -26,7 +26,9 @@ public class SuperBuilderBasic {
}
@java.lang.SuppressWarnings("all")
public B items(final java.util.Collection<? extends String> items) {
- if (items == null) throw new java.lang.NullPointerException("items cannot be null");
+ 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 self();
diff --git a/test/transform/resource/after-delombok/SuperBuilderBasicToBuilder.java b/test/transform/resource/after-delombok/SuperBuilderBasicToBuilder.java
index 1c0d378d..c0a80f93 100644
--- a/test/transform/resource/after-delombok/SuperBuilderBasicToBuilder.java
+++ b/test/transform/resource/after-delombok/SuperBuilderBasicToBuilder.java
@@ -69,7 +69,9 @@ public class SuperBuilderBasicToBuilder {
}
@java.lang.SuppressWarnings("all")
public B items(final java.util.Collection<? extends String> items) {
- if (items == null) throw new java.lang.NullPointerException("items cannot be null");
+ 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 self();
diff --git a/test/transform/resource/after-delombok/SuperBuilderSingularAnnotatedTypes.java b/test/transform/resource/after-delombok/SuperBuilderSingularAnnotatedTypes.java
index 865af859..f6e0f024 100644
--- a/test/transform/resource/after-delombok/SuperBuilderSingularAnnotatedTypes.java
+++ b/test/transform/resource/after-delombok/SuperBuilderSingularAnnotatedTypes.java
@@ -32,7 +32,9 @@ class SuperBuilderSingularAnnotatedTypes {
}
@java.lang.SuppressWarnings("all")
public B foos(final java.util.Collection<? extends @MyAnnotation @NonNull String> foos) {
- if (foos == null) throw new java.lang.NullPointerException("foos cannot be null");
+ if (foos == null) {
+ throw new java.lang.NullPointerException("foos cannot be null");
+ }
if (this.foos == null) this.foos = new java.util.ArrayList<@MyAnnotation @NonNull String>();
this.foos.addAll(foos);
return self();
@@ -60,7 +62,9 @@ class SuperBuilderSingularAnnotatedTypes {
}
@java.lang.SuppressWarnings("all")
public B bars(final java.util.Map<? extends @MyAnnotation @NonNull String, ? extends @MyAnnotation @NonNull Integer> bars) {
- if (bars == null) throw new java.lang.NullPointerException("bars cannot be null");
+ if (bars == null) {
+ throw new java.lang.NullPointerException("bars cannot be null");
+ }
if (this.bars$key == null) {
this.bars$key = new java.util.ArrayList<@MyAnnotation @NonNull String>();
this.bars$value = new java.util.ArrayList<@MyAnnotation @NonNull Integer>();
diff --git a/test/transform/resource/after-delombok/SuperBuilderWithCustomBuilderMethod.java b/test/transform/resource/after-delombok/SuperBuilderWithCustomBuilderMethod.java
index 4300a5ec..cfa39295 100644
--- a/test/transform/resource/after-delombok/SuperBuilderWithCustomBuilderMethod.java
+++ b/test/transform/resource/after-delombok/SuperBuilderWithCustomBuilderMethod.java
@@ -26,7 +26,9 @@ public class SuperBuilderWithCustomBuilderMethod {
}
@java.lang.SuppressWarnings("all")
public B items(final java.util.Collection<? extends String> items) {
- if (items == null) throw new java.lang.NullPointerException("items cannot be null");
+ 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 self();
diff --git a/test/transform/resource/after-delombok/SuperBuilderWithGenerics.java b/test/transform/resource/after-delombok/SuperBuilderWithGenerics.java
index 6b3d2ff0..f5627211 100644
--- a/test/transform/resource/after-delombok/SuperBuilderWithGenerics.java
+++ b/test/transform/resource/after-delombok/SuperBuilderWithGenerics.java
@@ -26,7 +26,9 @@ public class SuperBuilderWithGenerics {
}
@java.lang.SuppressWarnings("all")
public B items(final java.util.Collection<? extends String> items) {
- if (items == null) throw new java.lang.NullPointerException("items cannot be null");
+ 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 self();
diff --git a/test/transform/resource/after-delombok/SuperBuilderWithGenerics2.java b/test/transform/resource/after-delombok/SuperBuilderWithGenerics2.java
index b03cff07..2b4697d5 100644
--- a/test/transform/resource/after-delombok/SuperBuilderWithGenerics2.java
+++ b/test/transform/resource/after-delombok/SuperBuilderWithGenerics2.java
@@ -26,7 +26,9 @@ public class SuperBuilderWithGenerics2 {
}
@java.lang.SuppressWarnings("all")
public B items(final java.util.Collection<? extends String> items) {
- if (items == null) throw new java.lang.NullPointerException("items cannot be null");
+ 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 self();
diff --git a/test/transform/resource/after-delombok/SuperBuilderWithGenericsAndToBuilder.java b/test/transform/resource/after-delombok/SuperBuilderWithGenericsAndToBuilder.java
index 7403ff10..48d51fba 100644
--- a/test/transform/resource/after-delombok/SuperBuilderWithGenericsAndToBuilder.java
+++ b/test/transform/resource/after-delombok/SuperBuilderWithGenericsAndToBuilder.java
@@ -42,7 +42,9 @@ public class SuperBuilderWithGenericsAndToBuilder {
}
@java.lang.SuppressWarnings("all")
public B items(final java.util.Map<? extends Integer, ? extends String> items) {
- if (items == null) throw new java.lang.NullPointerException("items cannot be null");
+ if (items == null) {
+ throw new java.lang.NullPointerException("items cannot be null");
+ }
if (this.items$key == null) {
this.items$key = new java.util.ArrayList<Integer>();
this.items$value = new java.util.ArrayList<String>();
diff --git a/test/transform/resource/after-delombok/SuperBuilderWithPrefixes.java b/test/transform/resource/after-delombok/SuperBuilderWithPrefixes.java
index 324a1443..9662c4d9 100644
--- a/test/transform/resource/after-delombok/SuperBuilderWithPrefixes.java
+++ b/test/transform/resource/after-delombok/SuperBuilderWithPrefixes.java
@@ -32,7 +32,9 @@ class SuperBuilderWithPrefixes {
}
@java.lang.SuppressWarnings("all")
public B items(final java.util.Collection<? extends String> items) {
- if (items == null) throw new java.lang.NullPointerException("items cannot be null");
+ 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 self();
diff --git a/test/transform/resource/after-ecj/BuilderDefaultsWarnings.java b/test/transform/resource/after-ecj/BuilderDefaultsWarnings.java
index e9ecad90..bc773df3 100644
--- a/test/transform/resource/after-ecj/BuilderDefaultsWarnings.java
+++ b/test/transform/resource/after-ecj/BuilderDefaultsWarnings.java
@@ -24,7 +24,9 @@ public @Builder class BuilderDefaultsWarnings {
}
public @java.lang.SuppressWarnings("all") BuilderDefaultsWarnings.BuilderDefaultsWarningsBuilder 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);
diff --git a/test/transform/resource/after-ecj/BuilderSingularAnnotatedTypes.java b/test/transform/resource/after-ecj/BuilderSingularAnnotatedTypes.java
index a371de1c..977d081b 100644
--- a/test/transform/resource/after-ecj/BuilderSingularAnnotatedTypes.java
+++ b/test/transform/resource/after-ecj/BuilderSingularAnnotatedTypes.java
@@ -26,7 +26,9 @@ import lombok.Singular;
}
public @java.lang.SuppressWarnings("all") BuilderSingularAnnotatedTypes.BuilderSingularAnnotatedTypesBuilder foos(final java.util.Collection<? extends @MyAnnotation @NonNull String> foos) {
if ((foos == null))
- throw new java.lang.NullPointerException("foos cannot be null");
+ {
+ throw new java.lang.NullPointerException("foos cannot be null");
+ }
if ((this.foos == null))
this.foos = new java.util.ArrayList<@MyAnnotation @NonNull String>();
this.foos.addAll(foos);
@@ -57,7 +59,9 @@ import lombok.Singular;
}
public @java.lang.SuppressWarnings("all") BuilderSingularAnnotatedTypes.BuilderSingularAnnotatedTypesBuilder bars(final java.util.Map<? extends @MyAnnotation @NonNull String, ? extends @MyAnnotation @NonNull Integer> bars) {
if ((bars == null))
- throw new java.lang.NullPointerException("bars cannot be null");
+ {
+ throw new java.lang.NullPointerException("bars cannot be null");
+ }
if ((this.bars$key == null))
{
this.bars$key = new java.util.ArrayList<@MyAnnotation @NonNull String>();
diff --git a/test/transform/resource/after-ecj/BuilderSingularAnnotatedTypesWithSetterPrefix.java b/test/transform/resource/after-ecj/BuilderSingularAnnotatedTypesWithSetterPrefix.java
index cbb73c2f..96f346d4 100644
--- a/test/transform/resource/after-ecj/BuilderSingularAnnotatedTypesWithSetterPrefix.java
+++ b/test/transform/resource/after-ecj/BuilderSingularAnnotatedTypesWithSetterPrefix.java
@@ -26,7 +26,9 @@ import lombok.Singular;
}
public @java.lang.SuppressWarnings("all") BuilderSingularAnnotatedTypesWithSetterPrefix.BuilderSingularAnnotatedTypesWithSetterPrefixBuilder withFoos(final java.util.Collection<? extends @MyAnnotation @NonNull String> foos) {
if ((foos == null))
- throw new java.lang.NullPointerException("foos cannot be null");
+ {
+ throw new java.lang.NullPointerException("foos cannot be null");
+ }
if ((this.foos == null))
this.foos = new java.util.ArrayList<@MyAnnotation @NonNull String>();
this.foos.addAll(foos);
@@ -57,7 +59,9 @@ import lombok.Singular;
}
public @java.lang.SuppressWarnings("all") BuilderSingularAnnotatedTypesWithSetterPrefix.BuilderSingularAnnotatedTypesWithSetterPrefixBuilder withBars(final java.util.Map<? extends @MyAnnotation @NonNull String, ? extends @MyAnnotation @NonNull Integer> bars) {
if ((bars == null))
- throw new java.lang.NullPointerException("bars cannot be null");
+ {
+ throw new java.lang.NullPointerException("bars cannot be null");
+ }
if ((this.bars$key == null))
{
this.bars$key = new java.util.ArrayList<@MyAnnotation @NonNull String>();
diff --git a/test/transform/resource/after-ecj/BuilderSingularGuavaListsSets.java b/test/transform/resource/after-ecj/BuilderSingularGuavaListsSets.java
index d0c68234..ce159288 100644
--- a/test/transform/resource/after-ecj/BuilderSingularGuavaListsSets.java
+++ b/test/transform/resource/after-ecj/BuilderSingularGuavaListsSets.java
@@ -22,7 +22,9 @@ import lombok.Singular;
}
public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSets.BuilderSingularGuavaListsSetsBuilder<T> cards(final java.lang.Iterable<? extends T> cards) {
if ((cards == null))
- throw new java.lang.NullPointerException("cards cannot be null");
+ {
+ throw new java.lang.NullPointerException("cards cannot be null");
+ }
if ((this.cards == null))
this.cards = com.google.common.collect.ImmutableList.builder();
this.cards.addAll(cards);
@@ -40,7 +42,9 @@ import lombok.Singular;
}
public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSets.BuilderSingularGuavaListsSetsBuilder<T> frogs(final java.lang.Iterable<? extends Number> frogs) {
if ((frogs == null))
- throw new java.lang.NullPointerException("frogs cannot be null");
+ {
+ throw new java.lang.NullPointerException("frogs cannot be null");
+ }
if ((this.frogs == null))
this.frogs = com.google.common.collect.ImmutableList.builder();
this.frogs.addAll(frogs);
@@ -58,7 +62,9 @@ import lombok.Singular;
}
public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSets.BuilderSingularGuavaListsSetsBuilder<T> rawSet(final java.lang.Iterable<?> rawSet) {
if ((rawSet == null))
- throw new java.lang.NullPointerException("rawSet cannot be null");
+ {
+ throw new java.lang.NullPointerException("rawSet cannot be null");
+ }
if ((this.rawSet == null))
this.rawSet = com.google.common.collect.ImmutableSet.builder();
this.rawSet.addAll(rawSet);
@@ -76,7 +82,9 @@ import lombok.Singular;
}
public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSets.BuilderSingularGuavaListsSetsBuilder<T> passes(final java.lang.Iterable<? extends String> passes) {
if ((passes == null))
- throw new java.lang.NullPointerException("passes cannot be null");
+ {
+ throw new java.lang.NullPointerException("passes cannot be null");
+ }
if ((this.passes == null))
this.passes = com.google.common.collect.ImmutableSortedSet.naturalOrder();
this.passes.addAll(passes);
@@ -94,7 +102,9 @@ import lombok.Singular;
}
public @java.lang.SuppressWarnings("all") BuilderSingularGuavaListsSets.BuilderSingularGuavaListsSetsBuilder<T> users(final com.google.common.collect.Table<? extends Number, ? extends Number, ? extends String> users) {
if ((users == null))
- throw new java.lang.NullPointerException("users cannot be null");
+ {
+ throw new java.lang.NullPointerException("users cannot be null");
+ }
if ((this.users == null))
this.users = com.google.common.collect.ImmutableTable.builder();
this.users.putAll(users);
diff --git a/test/transform/resource/after-ecj/BuilderSingularGuavaMaps.java b/test/transform/resource/after-ecj/BuilderSingularGuavaMaps.java
index 08c72f98..76e6653b 100644
--- a/test/transform/resource/after-ecj/BuilderSingularGuavaMaps.java
+++ b/test/transform/resource/after-ecj/BuilderSingularGuavaMaps.java
@@ -18,7 +18,9 @@ import lombok.Singular;
}
public @java.lang.SuppressWarnings("all") BuilderSingularGuavaMaps.BuilderSingularGuavaMapsBuilder<K, V> battleaxes(final java.util.Map<? extends K, ? extends V> battleaxes) {
if ((battleaxes == null))
- throw new java.lang.NullPointerException("battleaxes cannot be null");
+ {
+ throw new java.lang.NullPointerException("battleaxes cannot be null");
+ }
if ((this.battleaxes == null))
this.battleaxes = com.google.common.collect.ImmutableMap.builder();
this.battleaxes.putAll(battleaxes);
@@ -36,7 +38,9 @@ import lombok.Singular;
}
public @java.lang.SuppressWarnings("all") BuilderSingularGuavaMaps.BuilderSingularGuavaMapsBuilder<K, V> vertices(final java.util.Map<? extends Integer, ? extends V> vertices) {
if ((vertices == null))
- throw new java.lang.NullPointerException("vertices cannot be null");
+ {
+ throw new java.lang.NullPointerException("vertices cannot be null");
+ }
if ((this.vertices == null))
this.vertices = com.google.common.collect.ImmutableSortedMap.naturalOrder();
this.vertices.putAll(vertices);
@@ -54,7 +58,9 @@ import lombok.Singular;
}
public @java.lang.SuppressWarnings("all") BuilderSingularGuavaMaps.BuilderSingularGuavaMapsBuilder<K, V> rawMap(final java.util.Map<?, ?> rawMap) {
if ((rawMap == null))
- throw new java.lang.NullPointerException("rawMap cannot be null");
+ {
+ throw new java.lang.NullPointerException("rawMap cannot be null");
+ }
if ((this.rawMap == null))
this.rawMap = com.google.common.collect.ImmutableBiMap.builder();
this.rawMap.putAll(rawMap);
diff --git a/test/transform/resource/after-ecj/BuilderSingularLists.java b/test/transform/resource/after-ecj/BuilderSingularLists.java
index c201a32b..712b5e86 100644
--- a/test/transform/resource/after-ecj/BuilderSingularLists.java
+++ b/test/transform/resource/after-ecj/BuilderSingularLists.java
@@ -18,7 +18,9 @@ import lombok.Singular;
}
public @java.lang.SuppressWarnings("all") BuilderSingularLists.BuilderSingularListsBuilder<T> children(final java.util.Collection<? extends T> children) {
if ((children == null))
- throw new java.lang.NullPointerException("children cannot be null");
+ {
+ throw new java.lang.NullPointerException("children cannot be null");
+ }
if ((this.children == null))
this.children = new java.util.ArrayList<T>();
this.children.addAll(children);
@@ -37,7 +39,9 @@ import lombok.Singular;
}
public @java.lang.SuppressWarnings("all") BuilderSingularLists.BuilderSingularListsBuilder<T> scarves(final java.util.Collection<? extends Number> scarves) {
if ((scarves == null))
- throw new java.lang.NullPointerException("scarves cannot be null");
+ {
+ throw new java.lang.NullPointerException("scarves cannot be null");
+ }
if ((this.scarves == null))
this.scarves = new java.util.ArrayList<Number>();
this.scarves.addAll(scarves);
@@ -56,7 +60,9 @@ import lombok.Singular;
}
public @java.lang.SuppressWarnings("all") BuilderSingularLists.BuilderSingularListsBuilder<T> rawList(final java.util.Collection<?> rawList) {
if ((rawList == null))
- throw new java.lang.NullPointerException("rawList cannot be null");
+ {
+ throw new java.lang.NullPointerException("rawList cannot be null");
+ }
if ((this.rawList == null))
this.rawList = new java.util.ArrayList<java.lang.Object>();
this.rawList.addAll(rawList);
diff --git a/test/transform/resource/after-ecj/BuilderSingularMaps.java b/test/transform/resource/after-ecj/BuilderSingularMaps.java
index d53e7022..072cf5e7 100644
--- a/test/transform/resource/after-ecj/BuilderSingularMaps.java
+++ b/test/transform/resource/after-ecj/BuilderSingularMaps.java
@@ -26,7 +26,9 @@ import lombok.Singular;
}
public @java.lang.SuppressWarnings("all") BuilderSingularMaps.BuilderSingularMapsBuilder<K, V> women(final java.util.Map<? extends K, ? extends V> women) {
if ((women == null))
- throw new java.lang.NullPointerException("women cannot be null");
+ {
+ throw new java.lang.NullPointerException("women cannot be null");
+ }
if ((this.women$key == null))
{
this.women$key = new java.util.ArrayList<K>();
@@ -59,7 +61,9 @@ import lombok.Singular;
}
public @java.lang.SuppressWarnings("all") BuilderSingularMaps.BuilderSingularMapsBuilder<K, V> men(final java.util.Map<? extends K, ? extends Number> men) {
if ((men == null))
- throw new java.lang.NullPointerException("men cannot be null");
+ {
+ throw new java.lang.NullPointerException("men cannot be null");
+ }
if ((this.men$key == null))
{
this.men$key = new java.util.ArrayList<K>();
@@ -92,7 +96,9 @@ import lombok.Singular;
}
public @java.lang.SuppressWarnings("all") BuilderSingularMaps.BuilderSingularMapsBuilder<K, V> rawMap(final java.util.Map<?, ?> rawMap) {
if ((rawMap == null))
- throw new java.lang.NullPointerException("rawMap cannot be null");
+ {
+ throw new java.lang.NullPointerException("rawMap cannot be null");
+ }
if ((this.rawMap$key == null))
{
this.rawMap$key = new java.util.ArrayList<java.lang.Object>();
@@ -125,7 +131,9 @@ import lombok.Singular;
}
public @java.lang.SuppressWarnings("all") BuilderSingularMaps.BuilderSingularMapsBuilder<K, V> stringMap(final java.util.Map<? extends String, ? extends V> stringMap) {
if ((stringMap == null))
- throw new java.lang.NullPointerException("stringMap cannot be null");
+ {
+ throw new java.lang.NullPointerException("stringMap cannot be null");
+ }
if ((this.stringMap$key == null))
{
this.stringMap$key = new java.util.ArrayList<String>();
diff --git a/test/transform/resource/after-ecj/BuilderSingularMapsWithSetterPrefix.java b/test/transform/resource/after-ecj/BuilderSingularMapsWithSetterPrefix.java
index 0bddd22c..dfa495bf 100644
--- a/test/transform/resource/after-ecj/BuilderSingularMapsWithSetterPrefix.java
+++ b/test/transform/resource/after-ecj/BuilderSingularMapsWithSetterPrefix.java
@@ -25,19 +25,20 @@ import lombok.Singular;
return this;
}
public @java.lang.SuppressWarnings("all") BuilderSingularMapsWithSetterPrefix.BuilderSingularMapsWithSetterPrefixBuilder<K, V> withWomen(final java.util.Map<? extends K, ? extends V> women) {
- if ((women != null))
+ if ((women == null))
{
- if ((this.women$key == null))
- {
- this.women$key = new java.util.ArrayList<K>();
- this.women$value = new java.util.ArrayList<V>();
- }
- for (java.util.Map.Entry<? extends K, ? extends V> $lombokEntry : women.entrySet())
- {
- this.women$key.add($lombokEntry.getKey());
- this.women$value.add($lombokEntry.getValue());
- }
+ throw new java.lang.NullPointerException("women cannot be null");
+ }
+ if ((this.women$key == null))
+ {
+ this.women$key = new java.util.ArrayList<K>();
+ this.women$value = new java.util.ArrayList<V>();
}
+ for (java.util.Map.Entry<? extends K, ? extends V> $lombokEntry : women.entrySet())
+ {
+ this.women$key.add($lombokEntry.getKey());
+ this.women$value.add($lombokEntry.getValue());
+ }
return this;
}
public @java.lang.SuppressWarnings("all") BuilderSingularMapsWithSetterPrefix.BuilderSingularMapsWithSetterPrefixBuilder<K, V> clearWomen() {
@@ -59,19 +60,20 @@ import lombok.Singular;
return this;
}
public @java.lang.SuppressWarnings("all") BuilderSingularMapsWithSetterPrefix.BuilderSingularMapsWithSetterPrefixBuilder<K, V> withMen(final java.util.Map<? extends K, ? extends Number> men) {
- if ((men != null))
+ if ((men == null))
{
- if ((this.men$key == null))
- {
- this.men$key = new java.util.ArrayList<K>();
- this.men$value = new java.util.ArrayList<Number>();
- }
- for (java.util.Map.Entry<? extends K, ? extends Number> $lombokEntry : men.entrySet())
- {
- this.men$key.add($lombokEntry.getKey());
- this.men$value.add($lombokEntry.getValue());
- }
+ throw new java.lang.NullPointerException("men cannot be null");
}
+ if ((this.men$key == null))
+ {
+ this.men$key = new java.util.ArrayList<K>();
+ this.men$value = new java.util.ArrayList<Number>();
+ }
+ for (java.util.Map.Entry<? extends K, ? extends Number> $lombokEntry : men.entrySet())
+ {
+ this.men$key.add($lombokEntry.getKey());
+ this.men$value.add($lombokEntry.getValue());
+ }
return this;
}
public @java.lang.SuppressWarnings("all") BuilderSingularMapsWithSetterPrefix.BuilderSingularMapsWithSetterPrefixBuilder<K, V> clearMen() {
@@ -127,19 +129,20 @@ import lombok.Singular;
return this;
}
public @java.lang.SuppressWarnings("all") BuilderSingularMapsWithSetterPrefix.BuilderSingularMapsWithSetterPrefixBuilder<K, V> withStringMap(final java.util.Map<? extends String, ? extends V> stringMap) {
- if ((stringMap != null))
+ if ((stringMap == null))
{
- if ((this.stringMap$key == null))
- {
- this.stringMap$key = new java.util.ArrayList<String>();
- this.stringMap$value = new java.util.ArrayList<V>();
- }
- for (java.util.Map.Entry<? extends String, ? extends V> $lombokEntry : stringMap.entrySet())
- {
- this.stringMap$key.add($lombokEntry.getKey());
- this.stringMap$value.add($lombokEntry.getValue());
- }
+ throw new java.lang.NullPointerException("stringMap cannot be null");
+ }
+ if ((this.stringMap$key == null))
+ {
+ this.stringMap$key = new java.util.ArrayList<String>();
+ this.stringMap$value = new java.util.ArrayList<V>();
}
+ for (java.util.Map.Entry<? extends String, ? extends V> $lombokEntry : stringMap.entrySet())
+ {
+ this.stringMap$key.add($lombokEntry.getKey());
+ this.stringMap$value.add($lombokEntry.getValue());
+ }
return this;
}
public @java.lang.SuppressWarnings("all") BuilderSingularMapsWithSetterPrefix.BuilderSingularMapsWithSetterPrefixBuilder<K, V> clearStringMap() {
@@ -206,7 +209,7 @@ import lombok.Singular;
}
private @Singular Map<K, V> women;
private @Singular SortedMap<K, ? extends Number> men;
- private @SuppressWarnings("all") @Singular("rawMap") Map rawMap;
+ private @SuppressWarnings("all") @Singular(value = "rawMap",ignoreNullCollections = true) Map rawMap;
private @Singular("stringMap") Map<String, V> stringMap;
@java.lang.SuppressWarnings("all") BuilderSingularMapsWithSetterPrefix(final Map<K, V> women, final SortedMap<K, ? extends Number> men, final Map rawMap, final Map<String, V> stringMap) {
super();
diff --git a/test/transform/resource/after-ecj/BuilderSingularNoAuto.java b/test/transform/resource/after-ecj/BuilderSingularNoAuto.java
index 47b413b3..80870c34 100644
--- a/test/transform/resource/after-ecj/BuilderSingularNoAuto.java
+++ b/test/transform/resource/after-ecj/BuilderSingularNoAuto.java
@@ -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);
diff --git a/test/transform/resource/after-ecj/BuilderSingularNoAutoWithSetterPrefix.java b/test/transform/resource/after-ecj/BuilderSingularNoAutoWithSetterPrefix.java
index 85cfda71..a3a02841 100644
--- a/test/transform/resource/after-ecj/BuilderSingularNoAutoWithSetterPrefix.java
+++ b/test/transform/resource/after-ecj/BuilderSingularNoAutoWithSetterPrefix.java
@@ -16,7 +16,9 @@ import lombok.Singular;
}
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");
+ {
+ 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") BuilderSingularNoAutoWithSetterPrefix.BuilderSingularNoAutoWithSetterPrefixBuilder withWidgets(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") BuilderSingularNoAutoWithSetterPrefix.BuilderSingularNoAutoWithSetterPrefixBuilder withItems(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);
diff --git a/test/transform/resource/after-ecj/BuilderSingularNullBehavior1.java b/test/transform/resource/after-ecj/BuilderSingularNullBehavior1.java
index 7ef52eb8..a0725f8a 100644
--- a/test/transform/resource/after-ecj/BuilderSingularNullBehavior1.java
+++ b/test/transform/resource/after-ecj/BuilderSingularNullBehavior1.java
@@ -1,13 +1,10 @@
import java.util.List;
import java.util.Collection;
import lombok.Singular;
-import lombok.Singular.NullCollectionBehavior;
@lombok.Builder class BuilderSingularNullBehavior1 {
public static @java.lang.SuppressWarnings("all") class BuilderSingularNullBehavior1Builder {
private @java.lang.SuppressWarnings("all") java.util.ArrayList<String> names;
private @java.lang.SuppressWarnings("all") java.util.ArrayList<String> locations;
- private @java.lang.SuppressWarnings("all") java.util.ArrayList<String> whatevers;
- private @java.lang.SuppressWarnings("all") java.util.ArrayList<String> doohickeys;
@java.lang.SuppressWarnings("all") BuilderSingularNullBehavior1Builder() {
super();
}
@@ -17,9 +14,8 @@ import lombok.Singular.NullCollectionBehavior;
this.names.add(name);
return this;
}
- public @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior1.BuilderSingularNullBehavior1Builder names(final java.util.Collection<? extends String> names) {
- if ((names == null))
- throw new java.lang.NullPointerException("names cannot be null");
+ public @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior1.BuilderSingularNullBehavior1Builder names(final java.util. @org.checkerframework.checker.nullness.qual.NonNull Collection<? extends String> names) {
+ assert (names != null): "names cannot be null";
if ((this.names == null))
this.names = new java.util.ArrayList<String>();
this.names.addAll(names);
@@ -36,11 +32,13 @@ import lombok.Singular.NullCollectionBehavior;
this.locations.add(location);
return this;
}
- public @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior1.BuilderSingularNullBehavior1Builder locations(final java.util.Collection<? extends String> locations) {
- java.util.Objects.requireNonNull(locations, "locations cannot be null");
- if ((this.locations == null))
- this.locations = new java.util.ArrayList<String>();
- this.locations.addAll(locations);
+ public @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior1.BuilderSingularNullBehavior1Builder locations(final java.util. @org.checkerframework.checker.nullness.qual.Nullable Collection<? extends String> locations) {
+ if ((locations != null))
+ {
+ if ((this.locations == null))
+ this.locations = new java.util.ArrayList<String>();
+ this.locations.addAll(locations);
+ }
return this;
}
public @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior1.BuilderSingularNullBehavior1Builder clearLocations() {
@@ -48,44 +46,6 @@ import lombok.Singular.NullCollectionBehavior;
this.locations.clear();
return this;
}
- public @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior1.BuilderSingularNullBehavior1Builder whatever(final String whatever) {
- if ((this.whatevers == null))
- this.whatevers = new java.util.ArrayList<String>();
- this.whatevers.add(whatever);
- return this;
- }
- public @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior1.BuilderSingularNullBehavior1Builder whatevers(final java.util.Collection<? extends String> whatevers) {
- com.google.common.base.Preconditions.checkNotNull(whatevers, "whatevers cannot be null");
- if ((this.whatevers == null))
- this.whatevers = new java.util.ArrayList<String>();
- this.whatevers.addAll(whatevers);
- return this;
- }
- public @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior1.BuilderSingularNullBehavior1Builder clearWhatevers() {
- if ((this.whatevers != null))
- this.whatevers.clear();
- return this;
- }
- public @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior1.BuilderSingularNullBehavior1Builder doohickey(final String doohickey) {
- if ((this.doohickeys == null))
- this.doohickeys = new java.util.ArrayList<String>();
- this.doohickeys.add(doohickey);
- return this;
- }
- public @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior1.BuilderSingularNullBehavior1Builder doohickeys(final java.util.Collection<? extends String> doohickeys) {
- if ((doohickeys != null))
- {
- if ((this.doohickeys == null))
- this.doohickeys = new java.util.ArrayList<String>();
- this.doohickeys.addAll(doohickeys);
- }
- return this;
- }
- public @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior1.BuilderSingularNullBehavior1Builder clearDoohickeys() {
- if ((this.doohickeys != null))
- this.doohickeys.clear();
- return this;
- }
public @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior1 build() {
java.util.List<String> names;
switch (((this.names == null) ? 0 : this.names.size())) {
@@ -109,44 +69,18 @@ import lombok.Singular.NullCollectionBehavior;
default :
locations = java.util.Collections.unmodifiableList(new java.util.ArrayList<String>(this.locations));
}
- java.util.List<String> whatevers;
- switch (((this.whatevers == null) ? 0 : this.whatevers.size())) {
- case 0 :
- whatevers = java.util.Collections.emptyList();
- break;
- case 1 :
- whatevers = java.util.Collections.singletonList(this.whatevers.get(0));
- break;
- default :
- whatevers = java.util.Collections.unmodifiableList(new java.util.ArrayList<String>(this.whatevers));
- }
- java.util.List<String> doohickeys;
- switch (((this.doohickeys == null) ? 0 : this.doohickeys.size())) {
- case 0 :
- doohickeys = java.util.Collections.emptyList();
- break;
- case 1 :
- doohickeys = java.util.Collections.singletonList(this.doohickeys.get(0));
- break;
- default :
- doohickeys = java.util.Collections.unmodifiableList(new java.util.ArrayList<String>(this.doohickeys));
- }
- return new BuilderSingularNullBehavior1(names, locations, whatevers, doohickeys);
+ return new BuilderSingularNullBehavior1(names, locations);
}
- public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() {
- return (((((((("BuilderSingularNullBehavior1.BuilderSingularNullBehavior1Builder(names=" + this.names) + ", locations=") + this.locations) + ", whatevers=") + this.whatevers) + ", doohickeys=") + this.doohickeys) + ")");
+ public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.@org.checkerframework.checker.nullness.qual.NonNull String toString() {
+ return (((("BuilderSingularNullBehavior1.BuilderSingularNullBehavior1Builder(names=" + this.names) + ", locations=") + this.locations) + ")");
}
}
private @Singular List<String> names;
- private @Singular(nullBehavior = Singular.NullCollectionBehavior.JDK) List<String> locations;
- private @Singular(nullBehavior = NullCollectionBehavior.GUAVA) List<String> whatevers;
- private @Singular(nullBehavior = lombok.Singular.NullCollectionBehavior.IGNORE) List<String> doohickeys;
- @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior1(final List<String> names, final List<String> locations, final List<String> whatevers, final List<String> doohickeys) {
+ private @Singular(ignoreNullCollections = true) List<String> locations;
+ @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior1(final List<String> names, final List<String> locations) {
super();
this.names = names;
this.locations = locations;
- this.whatevers = whatevers;
- this.doohickeys = doohickeys;
}
public static @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior1.BuilderSingularNullBehavior1Builder builder() {
return new BuilderSingularNullBehavior1.BuilderSingularNullBehavior1Builder();
diff --git a/test/transform/resource/after-ecj/BuilderSingularNullBehavior2.java b/test/transform/resource/after-ecj/BuilderSingularNullBehavior2.java
index 308a5174..85f9fb21 100644
--- a/test/transform/resource/after-ecj/BuilderSingularNullBehavior2.java
+++ b/test/transform/resource/after-ecj/BuilderSingularNullBehavior2.java
@@ -1,10 +1,8 @@
import java.util.List;
import lombok.Singular;
-import lombok.Singular.NullCollectionBehavior;
@lombok.Builder class BuilderSingularNullBehavior2 {
public static @java.lang.SuppressWarnings("all") class BuilderSingularNullBehavior2Builder {
private @java.lang.SuppressWarnings("all") java.util.ArrayList<String> locations;
- private @java.lang.SuppressWarnings("all") java.util.ArrayList<String> doohickeys;
@java.lang.SuppressWarnings("all") BuilderSingularNullBehavior2Builder() {
super();
}
@@ -14,7 +12,7 @@ import lombok.Singular.NullCollectionBehavior;
this.locations.add(location);
return this;
}
- public @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior2.BuilderSingularNullBehavior2Builder locations(final java.util. @org.checkerframework.checker.nullness.qual.NonNull Collection<? extends String> locations) {
+ public @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior2.BuilderSingularNullBehavior2Builder locations(final @org.springframework.lang.NonNull java.util.Collection<? extends String> locations) {
java.util.Objects.requireNonNull(locations, "locations cannot be null");
if ((this.locations == null))
this.locations = new java.util.ArrayList<String>();
@@ -26,26 +24,6 @@ import lombok.Singular.NullCollectionBehavior;
this.locations.clear();
return this;
}
- public @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior2.BuilderSingularNullBehavior2Builder doohickey(final String doohickey) {
- if ((this.doohickeys == null))
- this.doohickeys = new java.util.ArrayList<String>();
- this.doohickeys.add(doohickey);
- return this;
- }
- public @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior2.BuilderSingularNullBehavior2Builder doohickeys(final java.util. @org.checkerframework.checker.nullness.qual.Nullable Collection<? extends String> doohickeys) {
- if ((doohickeys != null))
- {
- if ((this.doohickeys == null))
- this.doohickeys = new java.util.ArrayList<String>();
- this.doohickeys.addAll(doohickeys);
- }
- return this;
- }
- public @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior2.BuilderSingularNullBehavior2Builder clearDoohickeys() {
- if ((this.doohickeys != null))
- this.doohickeys.clear();
- return this;
- }
public @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior2 build() {
java.util.List<String> locations;
switch (((this.locations == null) ? 0 : this.locations.size())) {
@@ -58,31 +36,18 @@ import lombok.Singular.NullCollectionBehavior;
default :
locations = java.util.Collections.unmodifiableList(new java.util.ArrayList<String>(this.locations));
}
- java.util.List<String> doohickeys;
- switch (((this.doohickeys == null) ? 0 : this.doohickeys.size())) {
- case 0 :
- doohickeys = java.util.Collections.emptyList();
- break;
- case 1 :
- doohickeys = java.util.Collections.singletonList(this.doohickeys.get(0));
- break;
- default :
- doohickeys = java.util.Collections.unmodifiableList(new java.util.ArrayList<String>(this.doohickeys));
- }
- return new BuilderSingularNullBehavior2(locations, doohickeys);
+ return new BuilderSingularNullBehavior2(locations);
}
- public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.@org.checkerframework.checker.nullness.qual.NonNull String toString() {
- return (((("BuilderSingularNullBehavior2.BuilderSingularNullBehavior2Builder(locations=" + this.locations) + ", doohickeys=") + this.doohickeys) + ")");
+ public @java.lang.Override @org.springframework.lang.NonNull @java.lang.SuppressWarnings("all") java.lang.String toString() {
+ return (("BuilderSingularNullBehavior2.BuilderSingularNullBehavior2Builder(locations=" + this.locations) + ")");
}
}
- private @Singular(nullBehavior = Singular.NullCollectionBehavior.JDK) List<String> locations;
- private @Singular(nullBehavior = lombok.Singular.NullCollectionBehavior.IGNORE) List<String> doohickeys;
- @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior2(final List<String> locations, final List<String> doohickeys) {
+ private @Singular List<String> locations;
+ @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior2(final List<String> locations) {
super();
this.locations = locations;
- this.doohickeys = doohickeys;
}
public static @java.lang.SuppressWarnings("all") BuilderSingularNullBehavior2.BuilderSingularNullBehavior2Builder builder() {
return new BuilderSingularNullBehavior2.BuilderSingularNullBehavior2Builder();
}
-}
+} \ No newline at end of file
diff --git a/test/transform/resource/after-ecj/BuilderSingularRedirectToGuava.java b/test/transform/resource/after-ecj/BuilderSingularRedirectToGuava.java
index 867bf7fa..73f24f97 100644
--- a/test/transform/resource/after-ecj/BuilderSingularRedirectToGuava.java
+++ b/test/transform/resource/after-ecj/BuilderSingularRedirectToGuava.java
@@ -18,7 +18,9 @@ import lombok.Singular;
}
public @java.lang.SuppressWarnings("all") BuilderSingularRedirectToGuava.BuilderSingularRedirectToGuavaBuilder dangerMice(final java.lang.Iterable<? extends String> dangerMice) {
if ((dangerMice == null))
- throw new java.lang.NullPointerException("dangerMice cannot be null");
+ {
+ throw new java.lang.NullPointerException("dangerMice cannot be null");
+ }
if ((this.dangerMice == null))
this.dangerMice = com.google.common.collect.ImmutableSet.builder();
this.dangerMice.addAll(dangerMice);
@@ -36,7 +38,9 @@ import lombok.Singular;
}
public @java.lang.SuppressWarnings("all") BuilderSingularRedirectToGuava.BuilderSingularRedirectToGuavaBuilder things(final java.util.Map<? extends Integer, ? extends Number> 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 = com.google.common.collect.ImmutableSortedMap.naturalOrder();
this.things.putAll(things);
@@ -54,7 +58,9 @@ import lombok.Singular;
}
public @java.lang.SuppressWarnings("all") BuilderSingularRedirectToGuava.BuilderSingularRedirectToGuavaBuilder doohickeys(final java.lang.Iterable<? extends Class<?>> doohickeys) {
if ((doohickeys == null))
- throw new java.lang.NullPointerException("doohickeys cannot be null");
+ {
+ throw new java.lang.NullPointerException("doohickeys cannot be null");
+ }
if ((this.doohickeys == null))
this.doohickeys = com.google.common.collect.ImmutableList.builder();
this.doohickeys.addAll(doohickeys);
diff --git a/test/transform/resource/after-ecj/BuilderSingularSets.java b/test/transform/resource/after-ecj/BuilderSingularSets.java
index 6cfa5203..8e1f4484 100644
--- a/test/transform/resource/after-ecj/BuilderSingularSets.java
+++ b/test/transform/resource/after-ecj/BuilderSingularSets.java
@@ -18,7 +18,9 @@ import lombok.Singular;
}
public @java.lang.SuppressWarnings("all") BuilderSingularSets.BuilderSingularSetsBuilder<T> dangerMice(final java.util.Collection<? extends T> dangerMice) {
if ((dangerMice == null))
- throw new java.lang.NullPointerException("dangerMice cannot be null");
+ {
+ throw new java.lang.NullPointerException("dangerMice cannot be null");
+ }
if ((this.dangerMice == null))
this.dangerMice = new java.util.ArrayList<T>();
this.dangerMice.addAll(dangerMice);
@@ -37,7 +39,9 @@ import lombok.Singular;
}
public @java.lang.SuppressWarnings("all") BuilderSingularSets.BuilderSingularSetsBuilder<T> octopodes(final java.util.Collection<? extends Number> octopodes) {
if ((octopodes == null))
- throw new java.lang.NullPointerException("octopodes cannot be null");
+ {
+ throw new java.lang.NullPointerException("octopodes cannot be null");
+ }
if ((this.octopodes == null))
this.octopodes = new java.util.ArrayList<Number>();
this.octopodes.addAll(octopodes);
@@ -56,7 +60,9 @@ import lombok.Singular;
}
public @java.lang.SuppressWarnings("all") BuilderSingularSets.BuilderSingularSetsBuilder<T> rawSet(final java.util.Collection<?> rawSet) {
if ((rawSet == null))
- throw new java.lang.NullPointerException("rawSet cannot be null");
+ {
+ throw new java.lang.NullPointerException("rawSet cannot be null");
+ }
if ((this.rawSet == null))
this.rawSet = new java.util.ArrayList<java.lang.Object>();
this.rawSet.addAll(rawSet);
@@ -75,7 +81,9 @@ import lombok.Singular;
}
public @java.lang.SuppressWarnings("all") BuilderSingularSets.BuilderSingularSetsBuilder<T> stringSet(final java.util.Collection<? extends String> stringSet) {
if ((stringSet == null))
- throw new java.lang.NullPointerException("stringSet cannot be null");
+ {
+ throw new java.lang.NullPointerException("stringSet cannot be null");
+ }
if ((this.stringSet == null))
this.stringSet = new java.util.ArrayList<String>();
this.stringSet.addAll(stringSet);
diff --git a/test/transform/resource/after-ecj/BuilderSingularSetsWithSetterPrefix.java b/test/transform/resource/after-ecj/BuilderSingularSetsWithSetterPrefix.java
index cdc0390c..0dc91851 100644
--- a/test/transform/resource/after-ecj/BuilderSingularSetsWithSetterPrefix.java
+++ b/test/transform/resource/after-ecj/BuilderSingularSetsWithSetterPrefix.java
@@ -18,7 +18,9 @@ import lombok.Singular;
}
public @java.lang.SuppressWarnings("all") BuilderSingularSetsWithSetterPrefix.BuilderSingularSetsWithSetterPrefixBuilder<T> withDangerMice(final java.util.Collection<? extends T> dangerMice) {
if ((dangerMice == null))
- throw new java.lang.NullPointerException("dangerMice cannot be null");
+ {
+ throw new java.lang.NullPointerException("dangerMice cannot be null");
+ }
if ((this.dangerMice == null))
this.dangerMice = new java.util.ArrayList<T>();
this.dangerMice.addAll(dangerMice);
@@ -37,7 +39,9 @@ import lombok.Singular;
}
public @java.lang.SuppressWarnings("all") BuilderSingularSetsWithSetterPrefix.BuilderSingularSetsWithSetterPrefixBuilder<T> withOctopodes(final java.util.Collection<? extends Number> octopodes) {
if ((octopodes == null))
- throw new java.lang.NullPointerException("octopodes cannot be null");
+ {
+ throw new java.lang.NullPointerException("octopodes cannot be null");
+ }
if ((this.octopodes == null))
this.octopodes = new java.util.ArrayList<Number>();
this.octopodes.addAll(octopodes);
@@ -56,7 +60,9 @@ import lombok.Singular;
}
public @java.lang.SuppressWarnings("all") BuilderSingularSetsWithSetterPrefix.BuilderSingularSetsWithSetterPrefixBuilder<T> withRawSet(final java.util.Collection<?> rawSet) {
if ((rawSet == null))
- throw new java.lang.NullPointerException("rawSet cannot be null");
+ {
+ throw new java.lang.NullPointerException("rawSet cannot be null");
+ }
if ((this.rawSet == null))
this.rawSet = new java.util.ArrayList<java.lang.Object>();
this.rawSet.addAll(rawSet);
@@ -75,7 +81,9 @@ import lombok.Singular;
}
public @java.lang.SuppressWarnings("all") BuilderSingularSetsWithSetterPrefix.BuilderSingularSetsWithSetterPrefixBuilder<T> withStringSet(final java.util.Collection<? extends String> stringSet) {
if ((stringSet == null))
- throw new java.lang.NullPointerException("stringSet cannot be null");
+ {
+ throw new java.lang.NullPointerException("stringSet cannot be null");
+ }
if ((this.stringSet == null))
this.stringSet = new java.util.ArrayList<String>();
this.stringSet.addAll(stringSet);
diff --git a/test/transform/resource/after-ecj/BuilderSingularToBuilderWithNull.java b/test/transform/resource/after-ecj/BuilderSingularToBuilderWithNull.java
index c01b5b8f..41ed6dcc 100644
--- a/test/transform/resource/after-ecj/BuilderSingularToBuilderWithNull.java
+++ b/test/transform/resource/after-ecj/BuilderSingularToBuilderWithNull.java
@@ -13,7 +13,9 @@ import lombok.Singular;
}
public @java.lang.SuppressWarnings("all") BuilderSingularToBuilderWithNull.BuilderSingularToBuilderWithNullBuilder elems(final java.util.Collection<? extends String> elems) {
if ((elems == null))
- throw new java.lang.NullPointerException("elems cannot be null");
+ {
+ throw new java.lang.NullPointerException("elems cannot be null");
+ }
if ((this.elems == null))
this.elems = new java.util.ArrayList<String>();
this.elems.addAll(elems);
diff --git a/test/transform/resource/after-ecj/BuilderSingularToBuilderWithNullWithSetterPrefix.java b/test/transform/resource/after-ecj/BuilderSingularToBuilderWithNullWithSetterPrefix.java
index 092f0b55..6940cc08 100644
--- a/test/transform/resource/after-ecj/BuilderSingularToBuilderWithNullWithSetterPrefix.java
+++ b/test/transform/resource/after-ecj/BuilderSingularToBuilderWithNullWithSetterPrefix.java
@@ -13,7 +13,9 @@ import lombok.Singular;
}
public @java.lang.SuppressWarnings("all") BuilderSingularToBuilderWithNullWithSetterPrefix.BuilderSingularToBuilderWithNullWithSetterPrefixBuilder withElems(final java.util.Collection<? extends String> elems) {
if ((elems == null))
- throw new java.lang.NullPointerException("elems cannot be null");
+ {
+ throw new java.lang.NullPointerException("elems cannot be null");
+ }
if ((this.elems == null))
this.elems = new java.util.ArrayList<String>();
this.elems.addAll(elems);
diff --git a/test/transform/resource/after-ecj/BuilderSingularWildcardListsWithToBuilder.java b/test/transform/resource/after-ecj/BuilderSingularWildcardListsWithToBuilder.java
index 8a00644d..bc5e2a50 100644
--- a/test/transform/resource/after-ecj/BuilderSingularWildcardListsWithToBuilder.java
+++ b/test/transform/resource/after-ecj/BuilderSingularWildcardListsWithToBuilder.java
@@ -16,7 +16,9 @@ import lombok.Singular;
}
public @java.lang.SuppressWarnings("all") BuilderSingularWildcardListsWithToBuilder.BuilderSingularWildcardListsWithToBuilderBuilder objects(final java.util.Collection<?> objects) {
if ((objects == null))
- throw new java.lang.NullPointerException("objects cannot be null");
+ {
+ throw new java.lang.NullPointerException("objects cannot be null");
+ }
if ((this.objects == null))
this.objects = new java.util.ArrayList<java.lang.Object>();
this.objects.addAll(objects);
@@ -35,7 +37,9 @@ import lombok.Singular;
}
public @java.lang.SuppressWarnings("all") BuilderSingularWildcardListsWithToBuilder.BuilderSingularWildcardListsWithToBuilderBuilder numbers(final java.util.Collection<? extends Number> numbers) {
if ((numbers == null))
- throw new java.lang.NullPointerException("numbers cannot be null");
+ {
+ throw new java.lang.NullPointerException("numbers cannot be null");
+ }
if ((this.numbers == null))
this.numbers = new java.util.ArrayList<Number>();
this.numbers.addAll(numbers);
diff --git a/test/transform/resource/after-ecj/BuilderSingularWithPrefixes.java b/test/transform/resource/after-ecj/BuilderSingularWithPrefixes.java
index b4fa5cbe..4bc79326 100644
--- a/test/transform/resource/after-ecj/BuilderSingularWithPrefixes.java
+++ b/test/transform/resource/after-ecj/BuilderSingularWithPrefixes.java
@@ -13,7 +13,9 @@ import lombok.Singular;
}
public @java.lang.SuppressWarnings("all") BuilderSingularWithPrefixes.BuilderSingularWithPrefixesBuilder elems(final java.util.Collection<? extends String> elems) {
if ((elems == null))
- throw new java.lang.NullPointerException("elems cannot be null");
+ {
+ throw new java.lang.NullPointerException("elems cannot be null");
+ }
if ((this.elems == null))
this.elems = new java.util.ArrayList<String>();
this.elems.addAll(elems);
diff --git a/test/transform/resource/after-ecj/BuilderSingularWithPrefixesWithSetterPrefix.java b/test/transform/resource/after-ecj/BuilderSingularWithPrefixesWithSetterPrefix.java
index f10482d5..f492005b 100644
--- a/test/transform/resource/after-ecj/BuilderSingularWithPrefixesWithSetterPrefix.java
+++ b/test/transform/resource/after-ecj/BuilderSingularWithPrefixesWithSetterPrefix.java
@@ -13,7 +13,9 @@ import lombok.Singular;
}
public @java.lang.SuppressWarnings("all") BuilderSingularWithPrefixesWithSetterPrefix.BuilderSingularWithPrefixesWithSetterPrefixBuilder withElems(final java.util.Collection<? extends String> elems) {
if ((elems == null))
- throw new java.lang.NullPointerException("elems cannot be null");
+ {
+ throw new java.lang.NullPointerException("elems cannot be null");
+ }
if ((this.elems == null))
this.elems = new java.util.ArrayList<String>();
this.elems.addAll(elems);
diff --git a/test/transform/resource/after-ecj/BuilderWithDeprecated.java b/test/transform/resource/after-ecj/BuilderWithDeprecated.java
index 9dcddc49..724a25e6 100644
--- a/test/transform/resource/after-ecj/BuilderWithDeprecated.java
+++ b/test/transform/resource/after-ecj/BuilderWithDeprecated.java
@@ -26,7 +26,9 @@ public @Builder class BuilderWithDeprecated {
}
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");
+ {
+ throw new java.lang.NullPointerException("strings cannot be null");
+ }
if ((this.strings == null))
this.strings = new java.util.ArrayList<String>();
this.strings.addAll(strings);
@@ -45,7 +47,9 @@ public @Builder class BuilderWithDeprecated {
}
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");
+ {
+ 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);
diff --git a/test/transform/resource/after-ecj/BuilderWithToBuilder.java b/test/transform/resource/after-ecj/BuilderWithToBuilder.java
index ec72bdb8..72fa3721 100644
--- a/test/transform/resource/after-ecj/BuilderWithToBuilder.java
+++ b/test/transform/resource/after-ecj/BuilderWithToBuilder.java
@@ -29,7 +29,9 @@ import lombok.Builder;
}
public @java.lang.SuppressWarnings("all") BuilderWithToBuilder.BuilderWithToBuilderBuilder<T> bars(final java.util.Collection<? extends T> bars) {
if ((bars == null))
- throw new java.lang.NullPointerException("bars cannot be null");
+ {
+ throw new java.lang.NullPointerException("bars cannot be null");
+ }
if ((this.bars == null))
this.bars = new java.util.ArrayList<T>();
this.bars.addAll(bars);
diff --git a/test/transform/resource/after-ecj/CheckerFrameworkBuilder.java b/test/transform/resource/after-ecj/CheckerFrameworkBuilder.java
index d9201e39..3f998df4 100644
--- a/test/transform/resource/after-ecj/CheckerFrameworkBuilder.java
+++ b/test/transform/resource/after-ecj/CheckerFrameworkBuilder.java
@@ -32,7 +32,9 @@ import lombok.Singular;
}
public @org.checkerframework.checker.builder.qual.ReturnsReceiver @java.lang.SuppressWarnings("all") CheckerFrameworkBuilder.CheckerFrameworkBuilderBuilder names(final java.util.Collection<? extends String> names) {
if ((names == null))
- throw new java.lang.NullPointerException("names cannot be null");
+ {
+ throw new java.lang.NullPointerException("names cannot be null");
+ }
if ((this.names == null))
this.names = new java.util.ArrayList<String>();
this.names.addAll(names);
diff --git a/test/transform/resource/after-ecj/CheckerFrameworkSuperBuilder.java b/test/transform/resource/after-ecj/CheckerFrameworkSuperBuilder.java
index 94ec0a0c..163e9d68 100644
--- a/test/transform/resource/after-ecj/CheckerFrameworkSuperBuilder.java
+++ b/test/transform/resource/after-ecj/CheckerFrameworkSuperBuilder.java
@@ -33,7 +33,9 @@ class CheckerFrameworkSuperBuilder {
}
public @org.checkerframework.checker.builder.qual.ReturnsReceiver @java.lang.SuppressWarnings("all") B names(final java.util.Collection<? extends String> names) {
if ((names == null))
- throw new java.lang.NullPointerException("names cannot be null");
+ {
+ throw new java.lang.NullPointerException("names cannot be null");
+ }
if ((this.names == null))
this.names = new java.util.ArrayList<String>();
this.names.addAll(names);
diff --git a/test/transform/resource/after-ecj/SuperBuilderBasic.java b/test/transform/resource/after-ecj/SuperBuilderBasic.java
index 9e686f0f..b47f318d 100644
--- a/test/transform/resource/after-ecj/SuperBuilderBasic.java
+++ b/test/transform/resource/after-ecj/SuperBuilderBasic.java
@@ -21,7 +21,9 @@ public class SuperBuilderBasic {
}
public @java.lang.SuppressWarnings("all") B 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);
diff --git a/test/transform/resource/after-ecj/SuperBuilderBasicToBuilder.java b/test/transform/resource/after-ecj/SuperBuilderBasicToBuilder.java
index e027c9d2..56703396 100644
--- a/test/transform/resource/after-ecj/SuperBuilderBasicToBuilder.java
+++ b/test/transform/resource/after-ecj/SuperBuilderBasicToBuilder.java
@@ -47,7 +47,9 @@ public class SuperBuilderBasicToBuilder {
}
public @java.lang.SuppressWarnings("all") B 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);
diff --git a/test/transform/resource/after-ecj/SuperBuilderSingularAnnotatedTypes.java b/test/transform/resource/after-ecj/SuperBuilderSingularAnnotatedTypes.java
index 834d2180..eac26153 100644
--- a/test/transform/resource/after-ecj/SuperBuilderSingularAnnotatedTypes.java
+++ b/test/transform/resource/after-ecj/SuperBuilderSingularAnnotatedTypes.java
@@ -28,7 +28,9 @@ import lombok.Singular;
}
public @java.lang.SuppressWarnings("all") B foos(final java.util.Collection<? extends @MyAnnotation @NonNull String> foos) {
if ((foos == null))
- throw new java.lang.NullPointerException("foos cannot be null");
+ {
+ throw new java.lang.NullPointerException("foos cannot be null");
+ }
if ((this.foos == null))
this.foos = new java.util.ArrayList<@MyAnnotation @NonNull String>();
this.foos.addAll(foos);
@@ -59,7 +61,9 @@ import lombok.Singular;
}
public @java.lang.SuppressWarnings("all") B bars(final java.util.Map<? extends @MyAnnotation @NonNull String, ? extends @MyAnnotation @NonNull Integer> bars) {
if ((bars == null))
- throw new java.lang.NullPointerException("bars cannot be null");
+ {
+ throw new java.lang.NullPointerException("bars cannot be null");
+ }
if ((this.bars$key == null))
{
this.bars$key = new java.util.ArrayList<@MyAnnotation @NonNull String>();
diff --git a/test/transform/resource/after-ecj/SuperBuilderWithCustomBuilderMethod.java b/test/transform/resource/after-ecj/SuperBuilderWithCustomBuilderMethod.java
index 6605ae1d..25f6f876 100644
--- a/test/transform/resource/after-ecj/SuperBuilderWithCustomBuilderMethod.java
+++ b/test/transform/resource/after-ecj/SuperBuilderWithCustomBuilderMethod.java
@@ -21,7 +21,9 @@ public class SuperBuilderWithCustomBuilderMethod {
}
public @java.lang.SuppressWarnings("all") B 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);
diff --git a/test/transform/resource/after-ecj/SuperBuilderWithGenerics.java b/test/transform/resource/after-ecj/SuperBuilderWithGenerics.java
index 89ab8821..6bda526e 100644
--- a/test/transform/resource/after-ecj/SuperBuilderWithGenerics.java
+++ b/test/transform/resource/after-ecj/SuperBuilderWithGenerics.java
@@ -21,7 +21,9 @@ public class SuperBuilderWithGenerics {
}
public @java.lang.SuppressWarnings("all") B 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);
diff --git a/test/transform/resource/after-ecj/SuperBuilderWithGenerics2.java b/test/transform/resource/after-ecj/SuperBuilderWithGenerics2.java
index 2037f7b0..4fac5de9 100644
--- a/test/transform/resource/after-ecj/SuperBuilderWithGenerics2.java
+++ b/test/transform/resource/after-ecj/SuperBuilderWithGenerics2.java
@@ -21,7 +21,9 @@ public class SuperBuilderWithGenerics2 {
}
public @java.lang.SuppressWarnings("all") B 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);
diff --git a/test/transform/resource/after-ecj/SuperBuilderWithGenericsAndToBuilder.java b/test/transform/resource/after-ecj/SuperBuilderWithGenericsAndToBuilder.java
index 8b26e439..4e55ae38 100644
--- a/test/transform/resource/after-ecj/SuperBuilderWithGenericsAndToBuilder.java
+++ b/test/transform/resource/after-ecj/SuperBuilderWithGenericsAndToBuilder.java
@@ -34,7 +34,9 @@ public class SuperBuilderWithGenericsAndToBuilder {
}
public @java.lang.SuppressWarnings("all") B items(final java.util.Map<? extends Integer, ? 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$key == null))
{
this.items$key = new java.util.ArrayList<Integer>();
diff --git a/test/transform/resource/after-ecj/SuperBuilderWithPrefixes.java b/test/transform/resource/after-ecj/SuperBuilderWithPrefixes.java
index e3b5baeb..1f972899 100644
--- a/test/transform/resource/after-ecj/SuperBuilderWithPrefixes.java
+++ b/test/transform/resource/after-ecj/SuperBuilderWithPrefixes.java
@@ -24,7 +24,9 @@
}
public @java.lang.SuppressWarnings("all") B 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);
diff --git a/test/transform/resource/before/BuilderSingularMapsWithSetterPrefix.java b/test/transform/resource/before/BuilderSingularMapsWithSetterPrefix.java
index 89beb401..87ad7b9f 100644
--- a/test/transform/resource/before/BuilderSingularMapsWithSetterPrefix.java
+++ b/test/transform/resource/before/BuilderSingularMapsWithSetterPrefix.java
@@ -1,7 +1,6 @@
//FORMAT: javaLangAsFQN = skip
//FORMAT: generated = skip
//FORMAT: finalParams = skip
-//CONF: lombok.singular.nullCollections = ignore
import java.util.Map;
import java.util.SortedMap;
@@ -11,6 +10,6 @@ import lombok.Singular;
class BuilderSingularMapsWithSetterPrefix<K, V> {
@Singular private Map<K, V> women;
@Singular private SortedMap<K, ? extends Number> men;
- @SuppressWarnings("all") @Singular("rawMap") private Map rawMap;
+ @SuppressWarnings("all") @Singular(value = "rawMap", ignoreNullCollections = true) private Map rawMap;
@Singular("stringMap") private Map<String, V> stringMap;
}
diff --git a/test/transform/resource/before/BuilderSingularNullBehavior1.java b/test/transform/resource/before/BuilderSingularNullBehavior1.java
index 019b6473..bcf473a4 100644
--- a/test/transform/resource/before/BuilderSingularNullBehavior1.java
+++ b/test/transform/resource/before/BuilderSingularNullBehavior1.java
@@ -1,13 +1,12 @@
+//CONF: lombok.addNullAnnotations = checkerframework
+//CONF: lombok.nonNull.exceptionType = assertion
import java.util.List;
import java.util.Collection;
import lombok.Singular;
-import lombok.Singular.NullCollectionBehavior;
@lombok.Builder
class BuilderSingularNullBehavior1 {
@Singular private List<String> names;
- @Singular(nullBehavior = Singular.NullCollectionBehavior.JDK) private List<String> locations;
- @Singular(nullBehavior = NullCollectionBehavior.GUAVA) private List<String> whatevers;
- @Singular(nullBehavior = lombok.Singular.NullCollectionBehavior.IGNORE) private List<String> doohickeys;
+ @Singular(ignoreNullCollections = true) private List<String> locations;
}
diff --git a/test/transform/resource/before/BuilderSingularNullBehavior2.java b/test/transform/resource/before/BuilderSingularNullBehavior2.java
index 720cf5a8..7d1d0e57 100644
--- a/test/transform/resource/before/BuilderSingularNullBehavior2.java
+++ b/test/transform/resource/before/BuilderSingularNullBehavior2.java
@@ -1,11 +1,10 @@
-//CONF: lombok.addNullAnnotations = checkerframework
+//CONF: lombok.addNullAnnotations = spring
+//CONF: lombok.nonNull.exceptionType = JDK
import java.util.List;
import lombok.Singular;
-import lombok.Singular.NullCollectionBehavior;
@lombok.Builder
class BuilderSingularNullBehavior2 {
- @Singular(nullBehavior = Singular.NullCollectionBehavior.JDK) private List<String> locations;
- @Singular(nullBehavior = lombok.Singular.NullCollectionBehavior.IGNORE) private List<String> doohickeys;
+ @Singular private List<String> locations;
}