groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul King (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (GROOVY-7424) NPE in SecureASTCustomizer for interface method declarations
Date Thu, 04 Jun 2015 09:50:38 GMT

     [ https://issues.apache.org/jira/browse/GROOVY-7424?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Paul King resolved GROOVY-7424.
-------------------------------
       Resolution: Fixed
    Fix Version/s: 2.5.0-beta-1
                   2.4.4

Thanks for spotting the issue.

> NPE in SecureASTCustomizer for interface method declarations
> ------------------------------------------------------------
>
>                 Key: GROOVY-7424
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7424
>             Project: Groovy
>          Issue Type: Bug
>          Components: Compiler
>    Affects Versions: 2.3.4, 2.3.11, 2.4.3
>            Reporter: Carsten Mjartan
>            Assignee: Paul King
>             Fix For: 2.4.4, 2.5.0-beta-1
>
>
> if you apply the SecureASTCustomizer to code that contains an interface method declaration,
you get a NullPointerException at SecureASTCustomizer, Row 558 (Groovy 2.4.3)
> {code:java}
>         final SecuringCodeVisitor visitor = new SecuringCodeVisitor();
>         ast.getStatementBlock().visit(visitor);
>         for (ClassNode clNode : ast.getClasses()) {
>             if (clNode!=classNode) {
>                 checkMethodDefinitionAllowed(clNode);
>                 for (MethodNode methodNode : clNode.getMethods()) {
>                     if (!methodNode.isSynthetic()) {
> =>                      methodNode.getCode().visit(visitor);
>                     }
>                 }
>             }
>         }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message