Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support boolean value annotations #887

Closed

Conversation

astral303
Copy link

This fixes the error where, currently, when referencing annotations with boolean values, the compiler crashes with:


org.codehaus.jdt.groovy.internal.compiler.ast.GroovyEclipseBug: NYI for signature Z
	at org.codehaus.jdt.groovy.internal.compiler.ast.JDTAnnotationNode.createExpressionFor(JDTAnnotationNode.java:157)
	at org.codehaus.jdt.groovy.internal.compiler.ast.JDTAnnotationNode.ensureMembersInitialized(JDTAnnotationNode.java:114)
	at org.codehaus.jdt.groovy.internal.compiler.ast.JDTAnnotationNode.getMembers(JDTAnnotationNode.java:74)
	at org.codehaus.groovy.ast.tools.GeneralUtils.hasClosureMember(GeneralUtils.java:444)
	at org.codehaus.groovy.ast.tools.GeneralUtils.copyAnnotatedNodeAnnotations(GeneralUtils.java:243)
	at org.codehaus.groovy.transform.trait.TraitComposer.createForwarderMethod(TraitComposer.java:361)
	at org.codehaus.groovy.transform.trait.TraitComposer.applyTrait(TraitComposer.java:176)
	at org.codehaus.groovy.transform.trait.TraitComposer.doExtendTraits(TraitComposer.java:111)
	at org.codehaus.groovy.control.CompilationUnit$11.call(CompilationUnit.java:215)
	at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1139)```

astral303 added 2 commits May 13, 2019 15:40
this allows handling of annotations such as TestNG's @BeforeMethod(alwaysRun = true)
@pivotal-issuemaster
Copy link

@astral303 Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@pivotal-issuemaster
Copy link

@astral303 Thank you for signing the Contributor License Agreement!

@eric-milles
Copy link
Member

Thanks for the submission. I reworked your changes a bit to support all primitive types.

@ispringer
Copy link

@eric-milles, any chance you can do a 2.4.17-02 release that includes this fix?

@eric-milles
Copy link
Member

https://bintray.com/groovy/maven/groovy-eclipse-batch/2.4.17-02

Testing it some more locally before publishing and synching with Maven Central.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants