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 /src/core/lombok/eclipse/handlers | |
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 'src/core/lombok/eclipse/handlers')
-rw-r--r-- | src/core/lombok/eclipse/handlers/HandleSuperBuilder.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/lombok/eclipse/handlers/HandleSuperBuilder.java b/src/core/lombok/eclipse/handlers/HandleSuperBuilder.java index 3686cb03..3599dbe0 100644 --- a/src/core/lombok/eclipse/handlers/HandleSuperBuilder.java +++ b/src/core/lombok/eclipse/handlers/HandleSuperBuilder.java @@ -1204,7 +1204,7 @@ public class HandleSuperBuilder extends EclipseAnnotationHandler<SuperBuilder> { if ((def.bits & ASTNode.IsDefaultConstructor) != 0) continue; if (!def.isConstructor()) continue; if (isTolerate(type, def)) continue; - if (def.arguments.length != 1) continue; + if (def.arguments == null || def.arguments.length != 1) continue; // Cannot use typeMatches() here, because the parameter could be fully-qualified, partially-qualified, or not qualified. // A string-compare of the last part should work. If it's a false-positive, users could still @Tolerate it. |