github / github/codeql

Java: AnnotationElement does not extend Method

Open
#5,399 3 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
CodeQL
Stars
10.1k
Forks
2.1k
Avg merge
2d 15h
Merged PRs (30d)
141

Description

`AnnotationElement` is in CodeQL effectively a `Method` (i.e. `forall(AnnotationElement e | e instanceof Method)` will always hold), however it does not extend Method.

This makes usage confusing because Java interfaces and classes can have (despite it being discouraged) an `AnnotationType` as supertype. So it is not obvious how CodeQL will handle this unless you look in the source and find out how `AnnotationElement` is defined.

Slightly related to #3708

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.