]> source.dussan.org Git - aspectj.git/commit
Fix #366085 concerning declared annotations with source retention
authorAlexander Kriegisch <Alexander@Kriegisch.name>
Sun, 4 Dec 2022 15:16:37 +0000 (16:16 +0100)
committerAlexander Kriegisch <Alexander@Kriegisch.name>
Wed, 21 Dec 2022 13:57:39 +0000 (20:57 +0700)
commit65f1ec72c2fc9446a162780dc3f6dee625704c02
tree2ed8eedb386b22f65b29c44ec90c9d33eb8ba64d
parentb08d7d2a31f6d6444e4fea980a7d85f2944055b3
Fix #366085 concerning declared annotations with source retention

See https://bugs.eclipse.org/bugs/show_bug.cgi?id=366085.
See https://stackoverflow.com/q/74618269/1082681.

The issue described in the Bugzilla issue is about 'declare @type', but
similar issues also existed for 'declare @field', 'declare @method',
'declare @constructor'. This fix is rather superficial and leaves
things to be desired, because it is rather hacky and simply ignores
errors source retention annotation declarations during weaving. A better
fix would drop the corresponding declarations while parsing and also
issue compiler warnings in each case.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
org.aspectj.matcher/src/main/java/org/aspectj/weaver/patterns/DeclareAnnotation.java
tests/bugs1919/366085/Application.java [new file with mode: 0644]
tests/bugs1919/366085/DeclareAnnotationsAspect.aj [new file with mode: 0644]
tests/bugs1919/366085/Marker.java [new file with mode: 0644]
tests/bugs1919/366085/ToString.java [new file with mode: 0644]
tests/src/test/java/org/aspectj/systemtest/ajc1919/Bugs1919Tests.java
tests/src/test/resources/org/aspectj/systemtest/ajc1919/ajc1919.xml
weaver/src/main/java/org/aspectj/weaver/bcel/BcelClassWeaver.java