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 Javadoc in AnnotationElement #272

Merged
merged 1 commit into from
Nov 9, 2022
Merged

Conversation

gastaldi
Copy link
Member

@gastaldi gastaldi commented Nov 8, 2022

@rob-stoecklein
Copy link

rob-stoecklein commented Nov 9, 2022

This fixes the "annotation element JavaDoc" problem, as I can now run the simple test program okay.
However, this breaks our existing code when I attempt to run our full application.

Running:

output.addInterface("com.blah.blah.blah.ConfigAware<T>"); // output is of type InterfaceCapableSource<?>

gives the following exception stack trace:

java.lang.IllegalArgumentException: Invalid identifier : >ConfigAware<T><
	at org.jboss.forge.roaster._shade.org.eclipse.jdt.core.dom.SimpleName.setIdentifier(SimpleName.java:247)
	at org.jboss.forge.roaster._shade.org.eclipse.jdt.core.dom.AST.newSimpleName(AST.java:2793)
	at org.jboss.forge.roaster._shade.org.eclipse.jdt.core.dom.AST.newName(AST.java:2443)
	at org.jboss.forge.roaster.model.impl.AbstractInterfaceCapableJavaSource.addInterface(AbstractInterfaceCapableJavaSource.java:94)
	at com.tccc.kos.sdk.generator.builder.TypeBase.copyInterfaces(TypeBase.java:320)
	at com.tccc.kos.sdk.generator.builder.TypeClass.parse(TypeClass.java:34)

It happens because the target class implements the ConfigAware<T> interface, which contains the <T> generic.

Any ideas?
Was there a recent change to this code? (It works as expected in version 2.26.0.Final)

@rob-stoecklein
Copy link

I also get this error when I use v2.27.0.Final, so it has something to do with going from 2.26.0 to 2.27.0.

I see one thing that changed is org.eclipse.jdt.core, which went from v3.30.0 to v3.31.0.

@gastaldi
Copy link
Member Author

gastaldi commented Nov 9, 2022

@rob-stoecklein good catch! I pushed a fix to master and rebased this PR. Can you give it a try now? I'll release the next version once you confirm it's okay

@rob-stoecklein
Copy link

@gastaldi It now works like a champ -- thanks!

@gastaldi gastaldi merged commit ab36db6 into master Nov 9, 2022
@gastaldi gastaldi deleted the annotation_javadoc branch November 9, 2022 19:51
@rob-stoecklein
Copy link

We do you think 2.28.0 will be pushed to the Central repo?

@gastaldi
Copy link
Member Author

@rob-stoecklein I just released to Central, should be there in a few minutes

@gastaldi
Copy link
Member Author

@rob-stoecklein
Copy link

Excellent -- thank you!

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

Successfully merging this pull request may close these issues.

Support JavaDoc comment to an annotation element
2 participants