You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Marcin Erdmann (Jira)" <ji...@apache.org> on 2019/11/29 09:59:00 UTC
[jira] [Created] (GROOVY-9323) AST for precompiled classes loaded
from the classpath does not contain constructor annotation information
Marcin Erdmann created GROOVY-9323:
--------------------------------------
Summary: 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: 3.0.0-rc-1, 2.5.8, 2.4.17
Reporter: Marcin Erdmann
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)