This is an automated email from the ASF dual-hosted git repository. joshtynjala pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/royale-compiler.git
commit 7f0073bbc45ef163ac5fea85a261c6f0f1799ce2 Author: Josh Tynjala <[email protected]> AuthorDate: Wed Dec 18 09:53:51 2024 -0800 linter: missing null check in MissingASDocRule --- .../src/main/java/org/apache/royale/linter/rules/MissingASDocRule.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linter/src/main/java/org/apache/royale/linter/rules/MissingASDocRule.java b/linter/src/main/java/org/apache/royale/linter/rules/MissingASDocRule.java index e2fc08879..ad4c92db1 100644 --- a/linter/src/main/java/org/apache/royale/linter/rules/MissingASDocRule.java +++ b/linter/src/main/java/org/apache/royale/linter/rules/MissingASDocRule.java @@ -75,7 +75,7 @@ public class MissingASDocRule extends LinterRule { return; } IASToken token = tokenQuery.getTokenBefore(definitionNode, false, true); - if (token.getType() == ASTokenTypes.TOKEN_ASDOC_COMMENT) { + if (token != null && token.getType() == ASTokenTypes.TOKEN_ASDOC_COMMENT) { String docComment = token.getText(); if (!isDocCommentEmpty(docComment)) { return;
