Removes unused ElementTypes in @Target annotations. The current approach is to only remove ElementTypes, not add them, so we don't accidentally make a non TYPE_USE annotation into a TYPE_USE annotation, for example.
I also addressed two small bugs I encountered:
When all the wildcard import are JDK imports, synthetic classes should be generated in the current package instead of the first wildcard import package
Don't throw an exception when an annotation is applied on a package declaration
Instead of creating a new test case for this, I just modified one of the existing ones (SyntheticAnnotationTargetTest), since it's purpose already seemed to fit this PR.
@theron-wang can you resolve the merge conflict? It should be easy: you just need to decide whether the code in this PR or the code in #354 (which I just merged) should run first.
Removes unused
ElementType
s in@Target
annotations. The current approach is to only removeElementType
s, not add them, so we don't accidentally make a nonTYPE_USE
annotation into aTYPE_USE
annotation, for example.I also addressed two small bugs I encountered:
Instead of creating a new test case for this, I just modified one of the existing ones (
SyntheticAnnotationTargetTest
), since it's purpose already seemed to fit this PR.Thanks!