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 2019/11/29 11:11:00 UTC

[jira] [Commented] (GROOVY-9323) AST for precompiled classes loaded from the classpath does not contain constructor annotation information

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

Paul King commented on GROOVY-9323:
-----------------------------------

Nice catch. Your reasoning seems correct to me.

> AST for precompiled classes loaded from the classpath does not contain constructor annotation information
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: GROOVY-9323
>                 URL: https://issues.apache.org/jira/browse/GROOVY-9323
>             Project: Groovy
>          Issue Type: Bug
>          Components: Compiler
>    Affects Versions: 2.4.17, 2.5.8, 3.0.0-rc-1
>            Reporter: Marcin Erdmann
>            Priority: Major
>
> It looks like constructor annotation information is not populated in the AST for classes loaded from the classpath in this block of code in {{org.codehaus.groovy.vmplugin.v5.Java5#configureClassNode}}: https://github.com/apache/groovy/blob/master/src/main/java/org/codehaus/groovy/vmplugin/v5/Java5.java#L388. What seems to be missing are calls to {{setAnnotationMetaData()}} like in the block above for methods.
> I found this bug accidentally when using {{@InheritConstructors(constructorAnnotations = true))}} and not seeing the annotations copied onto inherited constructors in some cases which turned out to be when the superclass of the class annotated with {{@InheritConstructors}} is not part of the compiled sources but is loaded from a jar.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)