diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2021-03-21 05:09:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-21 05:09:13 +0100 |
commit | 38faf6d350d0e4749039538bdc201624cd2f1ecb (patch) | |
tree | 2f7eec57dc70ccd30ad90afdabc2498e97aeee1f /test/transform/resource/after-delombok | |
parent | 5ef5c77198acd9fc8d265f0e2fa0b0c199330868 (diff) | |
parent | 26cc8af4d8b0bc7944b5a7137e9e1c77f2f3cf43 (diff) | |
download | lombok-38faf6d350d0e4749039538bdc201624cd2f1ecb.tar.gz lombok-38faf6d350d0e4749039538bdc201624cd2f1ecb.tar.bz2 lombok-38faf6d350d0e4749039538bdc201624cd2f1ecb.zip |
Merge pull request #2770 from janrieke/superBuilderNPEinConstructorExists
[fixes #2704] SuperBuilder: avoid NPE on existing constructors
Diffstat (limited to 'test/transform/resource/after-delombok')
-rw-r--r-- | test/transform/resource/after-delombok/SuperBuilderWithExistingConstuctor.java | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/test/transform/resource/after-delombok/SuperBuilderWithExistingConstuctor.java b/test/transform/resource/after-delombok/SuperBuilderWithExistingConstuctor.java new file mode 100644 index 00000000..c23c24db --- /dev/null +++ b/test/transform/resource/after-delombok/SuperBuilderWithExistingConstuctor.java @@ -0,0 +1,39 @@ +public class SuperBuilderWithExistingConstuctor { + public SuperBuilderWithExistingConstuctor() { + } + @java.lang.SuppressWarnings("all") + public static abstract class SuperBuilderWithExistingConstuctorBuilder<C extends SuperBuilderWithExistingConstuctor, B extends SuperBuilderWithExistingConstuctor.SuperBuilderWithExistingConstuctorBuilder<C, B>> { + @java.lang.SuppressWarnings("all") + protected abstract B self(); + @java.lang.SuppressWarnings("all") + public abstract C build(); + @java.lang.Override + @java.lang.SuppressWarnings("all") + public java.lang.String toString() { + return "SuperBuilderWithExistingConstuctor.SuperBuilderWithExistingConstuctorBuilder()"; + } + } + @java.lang.SuppressWarnings("all") + private static final class SuperBuilderWithExistingConstuctorBuilderImpl extends SuperBuilderWithExistingConstuctor.SuperBuilderWithExistingConstuctorBuilder<SuperBuilderWithExistingConstuctor, SuperBuilderWithExistingConstuctor.SuperBuilderWithExistingConstuctorBuilderImpl> { + @java.lang.SuppressWarnings("all") + private SuperBuilderWithExistingConstuctorBuilderImpl() { + } + @java.lang.Override + @java.lang.SuppressWarnings("all") + protected SuperBuilderWithExistingConstuctor.SuperBuilderWithExistingConstuctorBuilderImpl self() { + return this; + } + @java.lang.Override + @java.lang.SuppressWarnings("all") + public SuperBuilderWithExistingConstuctor build() { + return new SuperBuilderWithExistingConstuctor(this); + } + } + @java.lang.SuppressWarnings("all") + protected SuperBuilderWithExistingConstuctor(final SuperBuilderWithExistingConstuctor.SuperBuilderWithExistingConstuctorBuilder<?, ?> b) { + } + @java.lang.SuppressWarnings("all") + public static SuperBuilderWithExistingConstuctor.SuperBuilderWithExistingConstuctorBuilder<?, ?> builder() { + return new SuperBuilderWithExistingConstuctor.SuperBuilderWithExistingConstuctorBuilderImpl(); + } +}
\ No newline at end of file |