aboutsummaryrefslogtreecommitdiffstats
path: root/org.aspectj.matcher
Commit message (Collapse)AuthorAgeFilesLines
* Release 1.9.20V1_9_20Alexander Kriegisch2023-08-161-1/+1
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Add method ArrayReferenceType.equals to fix failing testsAlexander Kriegisch2023-06-261-0/+8
| | | | | | | | | | | This also fixes a bug. Previously, ResolvedType.equals was used for equality check, and in there is a '==' comparison, which does not work for two different ArrayReferenceType instances, even if the component type is the same. Relates to #246. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Add null checks for Shadow.getResolvedSignature()Alexander Kriegisch2023-06-131-3/+5
| | | | | | Fixes #243. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Add safeguards for And/Or/Not pattern node typesAlexander Kriegisch2023-01-299-15/+30
| | | | | | | | Affects *PointCut, *TypePattern, *AnnotationTypePattern. Relates to #215. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Add traverse methods for declare and pattern typesAlexander Kriegisch2023-01-2911-4/+86
| | | | | | Relates to #215. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Add traverse methods for pointcut typesAlexander Kriegisch2023-01-2916-0/+130
| | | | | | Relates to #215. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Fix PointcutRewriterTest, add LogicalPointcutStructure test helper classAlexander Kriegisch2023-01-152-169/+360
| | | | | | | | | | | | | | | | | | | | | | | | | | | After WildTypePattern.hashCode was fixed in the previous commit, PointcutRewriterTest started failing, because in many places it was falsely relying on a specific order of hash codes, which cannot be guaranteed, especially since more instance fields are part of the hash code now in accordance with 'equals'. The new test helper class LogicalPointcutStructure is able to recognise chained '&&' and '||' pointcuts of the same logical nesting level, un-nesting them from the actual pointcut structure and making them comparable, disregarding their order. I.e., something like ((A && B) && C) && D is actually recognised to logically be A && B && C && D and equivalent to e.g. either of D && B && A && C A && B && D && C C && A && D && B This helps to compare rewritten pointcuts, as long as their logical structure has not been altered. Relates to #24. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* WildTypePattern: fix hashCode and toString methodsAlexander Kriegisch2023-01-151-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | Especially 'hashCode' did not correspond to 'equals', disregarding several fields, array dimension information being only one of them. This led to parts of pointcuts being ignored, because they were regarded as duplicates. Example: execution(Foo* *(..)) && !execution(Foo*[] *(..)) Here, the negated pattern was falsely regarded as equal to the first pattern, leading to an "A && !A" situation, i.e. no match at all. Furthermore, 'toString' did not print array strings, i.e. instead of "Foo*[][]" something like "Foo*" was printed. This false information was also present in annotations generated by the weaver. FuzzilyMatchingAspect was adjusted to actually match exactly once, as expected, for the "Foo*" return types, i.e. exclusions for the array return types have been added. Relates to #24. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Improve array matching for all TypePattern subclassesAlexander Kriegisch2023-01-1513-19/+62
| | | | | | Relates to #24. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Handle one- and multi-dimensional array return types correctlyAlexander Kriegisch2023-01-155-6/+33
| | | | | | | | | | Fixes https://github.com/eclipse/org.aspectj/issues/24, both the array return type matching as such as well as matching dimensionality patterns correctly. E.g., 'Foo*[]' is not the same as 'Foo*[][]'. This also works correctly in combination with asterisks, even for primitive types, i.e. 'in*[][]' correctly matches a 2-dimensional array of 'int'. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Simplify if-else in WildTypePattern.matchesExactlyByNameAlexander Kriegisch2023-01-151-5/+1
| | | | | | | | | A simple boolean condition is enough. Loosely relates to https://github.com/eclipse/org.aspectj/issues/24, but actually it is just drive-by cosmetics. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Fix WildTypePattern.isArrayAlexander Kriegisch2023-01-151-1/+1
| | | | | | | | | The method falsely determined that a one-dimensional array was not an array due to a one-off bug. Relates to https://github.com/eclipse/org.aspectj/issues/24. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Improve code and documentation for #366085 fixAlexander Kriegisch2022-12-281-39/+52
| | | | | | | | | | | This commit is a follow-up for 65f1ec72. The SOURCE retention case is documented now and considered in a few more call sites. The previously already similar code structures in - DeclareAnnotation.ensureAnnotationDiscovered, - DeclareAnnotation.getAnnotationType have both been streamlined and still remain logically in sync. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Set version to 1.9.20-SNAPSHOTAlexander Kriegisch2022-12-211-1/+1
|
* AspectJ release 1.9.19V1_9_19Alexander Kriegisch2022-12-211-1/+1
|
* Fix #366085 concerning declared annotations with source retentionAlexander Kriegisch2022-12-211-0/+4
| | | | | | | | | | | | | | | 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>
* Set Maven version to 1.9.19-SNAPSHOTAlexander Kriegisch2022-10-021-1/+1
| | | | | | | It makes sense to indicate the Java version in the minor-minor of AspectJ artifacts. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Cleanup redundant null check before instanceofAndrey Turbanov2022-04-172-2/+2
|
* Reduce 'Object' class usageAndrey Turbanov2022-04-152-9/+9
|
* Remove redundant casts after generics updateAndrey Turbanov2022-04-1216-38/+33
|
* Set version to 1.9.10-SNAPSHOTAlexander Kriegisch2022-03-311-1/+1
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Release AspectJ version 1.9.9.1V1_9_9_1Alexander Kriegisch2022-03-311-1/+1
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Set version to 1.9.10-SNAPSHOTAlexander Kriegisch2022-03-241-1/+1
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Set version to 1.9.9V1_9_9Alexander Kriegisch2022-03-241-1/+1
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Cleanup redundant type casts, due to too weak variable type declarationAndrey Turbanov2022-02-263-20/+8
|
* Set version to 1.9.9-SNAPSHOTAlexander Kriegisch2022-02-111-1/+1
|
* Set version to 1.9.8V1_9_8Alexander Kriegisch2022-02-111-1/+1
|
* Improve annotation style if pointcut handlingAndy Clement2022-01-311-6/+32
| | | | | | | | | This fixes: - negating annotation style if() pointcuts doesn't work - annotation style if() pointcut not able to use a binding that is not exposed Fixes #120,#122
* polish - typoAndy Clement2022-01-311-1/+1
|
* Merge pull request #104 from turbanoff/use_generic_instead_of_raw_typesAndy Clement2022-01-1016-36/+36
|\ | | | | Update org.aspectj.matcher code to use generics.
| * Update org.aspectj.matcher code to use generics.Andrey Turbanov2021-11-2016-36/+36
| | | | | | | | Generics make code more type-safe and allows removing ugly type-casts.
* | Reduce empty array allocationsAndrey Turbanov2021-12-1810-21/+19
| |
* | Merge pull request #103 from turbanoff/redundant_boxingAndy Clement2021-12-131-1/+1
|\ \ | | | | | | Cleanup redundant boxing.
| * | Cleanup redundant boxing.Andrey Turbanov2021-11-201-1/+1
| |/ | | | | | | | | Methods Integer.parseInt/Boolean.parseBoolean should be preferred over Integer.valueOf/Boolean.valueOf/ if final result is primitive. They are generally faster and generate less garbage.
* | Replace more usages of StringBuffer with StringBuilderAndrey Turbanov2021-12-051-3/+3
| |
* | Merge pull request #102 from turbanoff/trim_trailing_whitespacesAndy Clement2021-11-302-4/+4
|\ \ | | | | | | Trim trailing whitespaces.
| * | Trim trailing whitespaces.Andrey Turbanov2021-11-202-4/+4
| |/ | | | | | | | | Trailing whitespaces are useless. Most of code-styles forbids them. Most of editors always trim them on save. I propose to clean up project from trailing whitespaces in all java files at once.
* / Replace uses of StringBuffer with StringBuilder.Andrey Turbanov2021-11-2057-102/+102
|/ | | | StringBuffer is a legacy synchronized class. StringBuilder is a direct replacement to StringBuffer which generally have better performance.
* Set version to 1.9.8-SNAPSHOTAndy Clement2021-06-241-1/+1
|
* 1.9.7 releaseV1_9_7Andy Clement2021-06-241-1/+1
|
* Upgrade license from CPLv1/EPLv1 to EPLv2Alexander Kriegisch2021-06-04284-2576/+2576
| | | | | | | This was required by the Eclipse team as one precondition for the next release. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Use canonical snapshot version 1.9.7-SNAPSHOTAlexander Kriegisch2021-05-231-1/+1
| | | | | | | | | Before, we used 1.9.7.BUILD-SNAPSHOT, which according to Andy Clement was originally an intent across a group of Spring projects he was involved in, to ensure that SNAPSHOTS were sorted alphabetically ahead of MILESTONEs and ahead of RCs. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Remove redundant 'name' and 'packaging' tags from POMsAlexander Kriegisch2021-04-151-2/+0
| | | | | | | If 'name' is identical to 'artifactId' and 'packaging' has the default value 'jar', we can just remove those tags from the POM. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Clean up Maven dependencies using 'dependency:analyze' goalAlexander Kriegisch2021-04-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Notably, this change involves a partial revert of @4a5660b3, because we are not using JUnit Jupiter yet but still JUnit 4 tests. See discussion under commit at https://github.com/eclipse/org.aspectj/commit/4a5660b3. Many other warnings - concerning both used undeclared and unused declared dependencies - were eliminated by adding or removing the corresponding dependencies from the POMs. Furthermore, I tried to make sure that some clearly test-scoped dependencies are now actually declared as such, so as to avoid unwanted transitivity bleeding into compile scope and maybe unwanted classes ending up in uber JARs via Maven Shade or Maven Assembly. TODO: I am not so sure why modules other than 'run-all-unit-tests' would depend on test JARs. I hope I broke nothing essential there. As of today, the other modules where I found '<type>test-jar</type>' dependencies are: - ajde - testing - testing-drivers - tests - weaver Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Get rid of some Maven warnings concerning plugins + dependenciesAlexander Kriegisch2021-03-301-1/+0
| | | | | | Duplicate dependencies, missing or mismatching versions Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Replace system-scoped dependency on commons by granular dependenciesAlexander Kriegisch2021-03-291-6/+3
| | | | | | | | | | | | There are only two direct dependencies used in AspectJ code: - Commons Digester (module 'testing') - Commons Logging (module 'org.aspectj.matcher') I declared those two and experimentally removed all the other system-scoped dependencies, as it should be. Let's see if the build works with transitive dependencies. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Fix some deprecated Java and JUnit warnings by using newer API callsAlexander Kriegisch2021-03-216-11/+19
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Strip down compiler messages to AspectJ-specific onesAlexander Kriegisch2021-03-191-1/+1
| | | | | | | | | | | | | | | | | | | | Delete all properties from messages_aspectj.properties which were just copied from Eclipse and basically the same. This not only gets rid of duplicates but also eliminates differences found between upstream and AspectJ strings which were just cause by errors or oversights during manual upgrade. TODO: - Find a way to print the '-X' options as info instead of yielding 'abort', making it seem as if compilation failed and print the usage message to stdErr instead of stdOut. - Eclipse also has misc.usage.warn, not just misc.usage, i.e. usage info specifically for warning options. Make sure that AspectJ uses it consistently. - Find a way to merge AspectJ-specific options into the standard Eclipse usage text instead of completely replacing it, further reducing the need to merge and copy upstream content. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Fix javadoc references to nonexistent fields, classes, or packagesJerry James2020-09-145-11/+11
|
* Fix misplaced or incorrect javadoc tagsJerry James2020-09-1412-26/+21
|