codeql icon indicating copy to clipboard operation
codeql copied to clipboard

Java: Add support for Annotation types stub generation

Open atorralba opened this issue 3 years ago • 1 comments

Adds support for Annotation types in our Java stub generator.

Due to default values for Annotation methods not being currently supported, the stubs generated may need manual correction if the original types have default values, e.g. https://github.com/spring-projects/spring-framework/blob/main/spring-web/src/main/java/org/springframework/web/bind/annotation/RequestMapping.java#L85.

atorralba avatar Apr 07 '22 13:04 atorralba

Should there be a test for this?

Good point @tamasvajk, thanks! I had to create a .jar file to test the stub generation, since our usual stubs are source files, which are ignored by the stub generator.

See 7687c8c for details, let me know if something doesn't add up.

atorralba avatar Sep 02 '22 08:09 atorralba

Thanks for the review @tamasvajk @smowton and sorry for the delay. Comments addressed in f860ae8.

atorralba avatar Oct 03 '22 08:10 atorralba