Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-4709

@Interrupt AST transformations should not be applied on abstract methods

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.8-rc-1
    • 1.8-rc-2, 1.9-beta-1
    • None
    • None
    • Patch

    Description

      When a class is annotated with @ThreadInterrupt, @ConditionalInterrupt or @TimedInterrupt, a NullPointerException is thrown when visiting an abstract method.

      java.lang.NullPointerException
          at org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(CodeVisitorSupport.java:35)
          at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement(ClassCodeVisitorSupport.java:165)
          at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:69)
          at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClassCodeContainer(ClassCodeVisitorSupport.java:101)
          at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitConstructorOrMethod(ClassCodeVisitorSupport.java:112)
          at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitMethod(ClassCodeVisitorSupport.java:123)
          at org.codehaus.groovy.transform.ThreadInterruptibleASTTransformation.super$3$visitMethod(ThreadInterruptibleASTTransformation.groovy)
          at sun.reflect.GeneratedMethodAccessor184.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
          at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
          at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1054)
          at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:128)
          at org.codehaus.groovy.transform.ThreadInterruptibleASTTransformation.visitMethod(ThreadInterruptibleASTTransformation.groovy:73)
          at org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:1056)
          at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeVisitorSupport.java:50)
          at org.codehaus.groovy.transform.AbstractInterruptibleASTTransformation.visit(AbstractInterruptibleASTTransformation.java:89)
          at org.codehaus.groovy.transform.ASTTransformationVisitor.visitClass(ASTTransformationVisitor.java:129)
          at org.codehaus.groovy.transform.ASTTransformationVisitor$2.call(ASTTransformationVisitor.java:172)
          at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:948)
          at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:533)
          at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:511)
          at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:488)
          at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:283)
          at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:264)
      

      Attachments

        Activity

          People

            guillaume Guillaume Sauthier
            melix Cédric Champeau
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: