mirror of
https://github.com/github/codeql.git
synced 2025-12-21 03:06:31 +01:00
Fix stub generator
Add line break after all stubbed annotations to avoid malformed code See https://github.com/github/codeql/pull/8695\#discussion_r985674245
This commit is contained in:
@@ -36,12 +36,15 @@ abstract private class GeneratedType extends ClassOrInterface {
|
||||
}
|
||||
|
||||
private string stubAnnotations() {
|
||||
result =
|
||||
concat(Annotation an |
|
||||
this.(AnnotationType).getAnAnnotation() = an
|
||||
|
|
||||
stubAnnotation(an), "\n" order by an.getType().getQualifiedName()
|
||||
)
|
||||
if exists(this.(AnnotationType).getAnAnnotation())
|
||||
then
|
||||
result =
|
||||
concat(Annotation an |
|
||||
this.(AnnotationType).getAnAnnotation() = an
|
||||
|
|
||||
stubAnnotation(an), "\n" order by an.getType().getQualifiedName()
|
||||
) + "\n"
|
||||
else result = ""
|
||||
}
|
||||
|
||||
/** Gets the entire Java stub code for this type. */
|
||||
|
||||
Reference in New Issue
Block a user