[ 
https://issues.apache.org/jira/browse/GROOVY-8025?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15763677#comment-15763677
 ] 

Paul King commented on GROOVY-8025:
-----------------------------------

A partial fix has been applied to avoid the NPE (and show no annotations within 
the Groovydoc at the class level in that case).
A real fix needs to look at why the closure param on a class level annotation 
seems to have incorrect line/col info.

> Using closures with annotations on Spock classes results in Groovydoc 
> exception
> -------------------------------------------------------------------------------
>
>                 Key: GROOVY-8025
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8025
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 2.4.7
>            Reporter: Graeme Rocher
>
> Using groovydoc on the following code:
> {code}
> @IgnoreIf( { !System.getProperty('blah') })
> class UniqueConstraintSpec extends spock.lang.Specification {
> }
> {code}
> Produces the exception:
> {code}
> java.lang.NullPointerException
>     at 
> org.codehaus.groovy.tools.groovydoc.SimpleGroovyClassDocAssembler.getCurrentClassDoc(SimpleGroovyClassDocAssembler.java:886)
>     at 
> org.codehaus.groovy.tools.groovydoc.SimpleGroovyClassDocAssembler.getCurrentClassDoc(SimpleGroovyClassDocAssembler.java:888)
>     at 
> org.codehaus.groovy.tools.groovydoc.SimpleGroovyClassDocAssembler.getCurrentClassDoc(SimpleGroovyClassDocAssembler.java:888)
>     at 
> org.codehaus.groovy.tools.groovydoc.SimpleGroovyClassDocAssembler.getCurrentClassDoc(SimpleGroovyClassDocAssembler.java:888)
>     at 
> org.codehaus.groovy.tools.groovydoc.SimpleGroovyClassDocAssembler.getCurrentClassDoc(SimpleGroovyClassDocAssembler.java:888)
> {code}



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

Reply via email to