diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2018-08-21 00:01:40 +0200 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2018-08-21 00:02:12 +0200 |
commit | ca35539f7cd7967bfd8518d0ad0b0015bdd40cfc (patch) | |
tree | f45c5483f18d427d273032d426454677a0c4281a /test/transform/resource/before | |
parent | 35fe755b87f194621b5f328e4773f1f406f8ccc9 (diff) | |
download | lombok-ca35539f7cd7967bfd8518d0ad0b0015bdd40cfc.tar.gz lombok-ca35539f7cd7967bfd8518d0ad0b0015bdd40cfc.tar.bz2 lombok-ca35539f7cd7967bfd8518d0ad0b0015bdd40cfc.zip |
[fixes #1812] `@Singular` marked collections which nevertheless somehow ended up null would cause an NPE during `toBuilder()` invocations.
Diffstat (limited to 'test/transform/resource/before')
-rw-r--r-- | test/transform/resource/before/BuilderSingularToBuilderWithNull.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/transform/resource/before/BuilderSingularToBuilderWithNull.java b/test/transform/resource/before/BuilderSingularToBuilderWithNull.java new file mode 100644 index 00000000..92a102cb --- /dev/null +++ b/test/transform/resource/before/BuilderSingularToBuilderWithNull.java @@ -0,0 +1,10 @@ +import lombok.Singular; + +@lombok.Builder(toBuilder = true) +class BuilderSingularToBuilderWithNull { + @Singular private java.util.List<String> elems; + + public static void test() { + new BuilderSingularToBuilderWithNull(null).toBuilder(); + } +} |