You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (JIRA)" <ji...@apache.org> on 2015/06/04 11:49:38 UTC

[jira] [Assigned] (GROOVY-7424) NPE in SecureASTCustomizer for interface method declarations

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

Paul King reassigned GROOVY-7424:
---------------------------------

    Assignee: Paul King

> 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
>
> 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)