diff options
author | Reinier Zwitserloot <r.zwitserloot@projectlombok.org> | 2021-04-18 06:00:33 +0200 |
---|---|---|
committer | Reinier Zwitserloot <r.zwitserloot@projectlombok.org> | 2021-04-18 06:00:33 +0200 |
commit | 3f6d668f8343d2f78736ea36c7b5aa33013fea73 (patch) | |
tree | 6dd9cd4af895a471922c5ce97f08e2ec1a996604 /src/core/lombok/javac | |
parent | c4357b03bf00d7ac03e69f0dcfd4e6913a83ebb0 (diff) | |
download | lombok-3f6d668f8343d2f78736ea36c7b5aa33013fea73.tar.gz lombok-3f6d668f8343d2f78736ea36c7b5aa33013fea73.tar.bz2 lombok-3f6d668f8343d2f78736ea36c7b5aa33013fea73.zip |
[StandardExceptions] fix for javac
Diffstat (limited to 'src/core/lombok/javac')
-rw-r--r-- | src/core/lombok/javac/handlers/HandleStandardException.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/lombok/javac/handlers/HandleStandardException.java b/src/core/lombok/javac/handlers/HandleStandardException.java index 334f85ca..dd764233 100644 --- a/src/core/lombok/javac/handlers/HandleStandardException.java +++ b/src/core/lombok/javac/handlers/HandleStandardException.java @@ -33,6 +33,7 @@ import lombok.experimental.StandardException; import lombok.core.AST.Kind; import lombok.core.AnnotationValues; import lombok.delombok.LombokOptionsFactory; +import lombok.javac.Javac; import lombok.javac.JavacAnnotationHandler; import lombok.javac.JavacNode; import lombok.javac.JavacTreeMaker; @@ -57,8 +58,8 @@ public class HandleStandardException extends JavacAnnotationHandler<StandardExce return; } - JCClassDecl classDef = (JCClassDecl) typeNode.get(); - if (classDef.extending == null) { + JCTree extending = Javac.getExtendsClause((JCClassDecl) typeNode.get()); + if (extending == null) { annotationNode.addError("@StandardException requires that you extend a Throwable type"); return; } |