diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2018-09-17 23:44:26 +0200 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2018-09-18 01:21:33 +0200 |
commit | 9198551defb7dd71d872c7b86af0a3f0bf0ec545 (patch) | |
tree | 7669f792959f1b5632c8870ef2550f95313ea52c /test/transform/resource/after-delombok/SuperBuilderWithNonNull.java | |
parent | d7873f2d21564e8e7f22409fe03681d7dd4c8c1e (diff) | |
download | lombok-9198551defb7dd71d872c7b86af0a3f0bf0ec545.tar.gz lombok-9198551defb7dd71d872c7b86af0a3f0bf0ec545.tar.bz2 lombok-9198551defb7dd71d872c7b86af0a3f0bf0ec545.zip |
Finishing work on making lombok do sensible things with TYPE_USE annotations and for example their use on the typearg in a collection type which is being `@Singular`-ized.
Diffstat (limited to 'test/transform/resource/after-delombok/SuperBuilderWithNonNull.java')
-rw-r--r-- | test/transform/resource/after-delombok/SuperBuilderWithNonNull.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/test/transform/resource/after-delombok/SuperBuilderWithNonNull.java b/test/transform/resource/after-delombok/SuperBuilderWithNonNull.java index 5eba938f..cac5482b 100644 --- a/test/transform/resource/after-delombok/SuperBuilderWithNonNull.java +++ b/test/transform/resource/after-delombok/SuperBuilderWithNonNull.java @@ -18,7 +18,10 @@ public class SuperBuilderWithNonNull { @java.lang.SuppressWarnings("all")
public abstract C build();
@java.lang.SuppressWarnings("all")
- public B nonNullParentField(final String nonNullParentField) {
+ public B nonNullParentField(@lombok.NonNull final String nonNullParentField) {
+ if (nonNullParentField == null) {
+ throw new java.lang.NullPointerException("nonNullParentField is marked @NonNull but is null");
+ }
this.nonNullParentField = nonNullParentField;
nonNullParentField$set = true;
return self();
@@ -72,7 +75,10 @@ public class SuperBuilderWithNonNull { @java.lang.SuppressWarnings("all")
public abstract C build();
@java.lang.SuppressWarnings("all")
- public B nonNullChildField(final String nonNullChildField) {
+ public B nonNullChildField(@lombok.NonNull final String nonNullChildField) {
+ if (nonNullChildField == null) {
+ throw new java.lang.NullPointerException("nonNullChildField is marked @NonNull but is null");
+ }
this.nonNullChildField = nonNullChildField;
return self();
}
|