aboutsummaryrefslogtreecommitdiffstats
path: root/weaver
Commit message (Collapse)AuthorAgeFilesLines
* BcelTypeMunger.mungeMethodDelegate: only use 'synchronized' when necessaryAlexander Kriegisch2023-01-071-3/+25
| | | | | | | | | | | | | | | | | | | | | Relates to #198. Now, we create a delegate method body which basically looks as follows: public void methodOne() { if (this.ajc$instance$MyAspect$MyMixin == null) { synchronized(this) { if (this.ajc$instance$MyAspect$MyMixin == null) { this.ajc$instance$MyAspect$MyMixin = MyAspect.aspectOf().createImplementation(this); } } } this.ajc$instance$MyAspect$MyMixin.methodOne(); } The idea for the outer null check is from @aclement, see https://github.com/eclipse/org.aspectj/pull/205#issuecomment-1371556080. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Improve BcelTypeMunger.mungeMethodDelegate to avoid race conditionAlexander Kriegisch2023-01-041-2/+31
| | | | | | | Fixes #198, i.e. test DeclareMixinTests.testCaseEConcurrent from the previous commit now passes. 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-2/+8
| | | | | | | | | | | | | | | 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-171-1/+1
|
* Remove redundant casts after generics updateAndrey Turbanov2022-04-125-5/+5
|
* BcelWorld.reportMatch: handle 'kind.getName() == null' correctlyAlexander Kriegisch2022-04-101-5/+7
| | | | | | Fixes #153. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* 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-266-13/+7
|
* 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
|
* Try to improve error reporting when Asm access issuesAndy Clement2022-01-313-4/+7
|
* Merge pull request #113 from turbanoff/use_generic_in_weaver_moduleAndy Clement2022-01-1410-28/+28
|\ | | | | Update 'weaver' code to use generics
| * Update 'weaver' code to use genericsAndrey Turbanov2022-01-1410-28/+28
| |
* | Couple of basic tests for the repository optimizationsAndy Clement2022-01-131-12/+14
| |
* | Optimize class loading - make backward compatible with legacy behaviourAlexander Kriegisch2022-01-131-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now the defaults are: + org.aspectj.apache.bcel.useSingleRepositoryInstance (default: false) + org.aspectj.apache.bcel.useUnavailableClassesCache (default: false) + org.aspectj.apache.bcel.ignoreCacheClearRequests (default: false) I.e. the new caching optimisations are opt-in instead of opt-out as originally designed. This might change in the future, but for now without any additional tests and experience with the new feature let us be conservative and make the build green first. I also added a few more code review findings concerning backward compatibility, which was less than 100% even with all three flags deactivated. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* | Optimize class loadingStefan Starke2022-01-131-14/+39
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | In our project we found out that during the build up of the spring context the class loading takes a very long time. Root cause is the huge amount of file I/O during pointcut class loading. We are taking about ~250k file loads. With these changes we managed to cut down the starting time by around 50%. What we found out is that IMHO - the clear method of the ClassLoaderRepository is called far too often -> in our settings this resulted in not a single cache hit as the cache got cleared permanently. Therefore we de-actived the cache clear calls inside the ClassLoaderRepository. Secondly we changed the Java15AnnotationFinder in a way to not always create new objects for the ClassLoaderRepository but re-use one static instance. Otherwise we experienced >100k objects being created. Last but not least we introduced a cache for unavailable classes so that they do not have to be looked up using file I/O over and over again. The whole behavior is configurable via + org.aspectj.apache.bcel.useSingleRepositoryInstance (default: true) + org.aspectj.apache.bcel.useUnavailableClassesCache (default: true) + org.aspectj.apache.bcel.ignoreCacheClearRequests (default: true) Signed-off-by: Stefan Starke <stefan@starkeweb.org> Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Reduce empty array allocationsAndrey Turbanov2021-12-1814-36/+33
|
* Merge pull request #102 from turbanoff/trim_trailing_whitespacesAndy Clement2021-11-303-14/+14
|\ | | | | Trim trailing whitespaces.
| * Trim trailing whitespaces.Andrey Turbanov2021-11-203-14/+14
| | | | | | | | | | 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-2017-29/+29
|/ | | | 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-04195-1843/+1842
| | | | | | | 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>
* Replace use of ASM-renamed by original ASMAlexander Kriegisch2021-05-164-17/+20
| | | | | | | | | | | | This involves replacing references in weaver application code as well as a few tests. In order to make AspectJ weaver + tools contain a relocated ASM version, I added a Maven Shade relocation step after Maven Assembly created the uber JARs. Relocation works for both binaries and sources and also encompasses Class::forName calls like in class AsmDetector. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Provision libraries in 'lib' automaticallyAlexander Kriegisch2021-05-051-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upon special request by Andy Clement, I included 'lib' as a child module in the parent POM again, making several modules which refer to downloaded library files dependent the 'lib' module. I am not sure I caught all of them, but I hope so. Now after cloning the project and configuring the token for reading from GitHub Packages (sorry!), you can just run a Maven build for the main project and no longer need to fail the first build, read the Maven Enforcer message and run 'cd lib && mvn compile' as a first step. This convenience comes at the price of a more complex POM and two new profiles: - Profile 'provision-libs' is auto-activated by the absence of a marker file, kicking off the library provisioning process and creating same marker file at the end, if successful. Therefore, during subsequent builds libraries will not be re-provisioned, because the marker file exists and Maven skips all download and (un)zip steps, which saves build time and bandwidth. Otherwise offline builds would not work either. - Profile 'clean-libs' needs to be activated manually, because by default 'mvn clean' will not erase provisioned libraries. In most cases, even after a clean a developer does not want to re-provision all libraries if they have not changed (e.g. new JDT Core build). But if you do wish too erase the libraries and the marker file, just call 'cd lib && mvn -P clean-libs clean'. Please note: The Maven Enforcer build step, which additionally checks for existence of other files, still exists and was moved from the parent POM to 'libs'. No matter if provisioning was just done or skipped because the main marker file exists, a quick heuristic check for that list of files is done during each build, failing the build with a comprehensive message if an inconsistency was found. The error message says which files are missing and tells the user: "There is an inconsistency in module subdirectory 'lib'. Please run 'mvn --projects lib -P clean-libs clean compile'. This should take care of cleaning and freshly downloading all necessary libraries to that directory, where some tests expect them to be." This should cover the topic. 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>
* Clean up remaining references to system-scoped dependenciesAlexander Kriegisch2021-04-101-9/+0
| | | | | | | | Now there is no system-scoped dependency left anymore in the Maven build, i.e. the corresponding warnings are gone and we can focus on the actual build log. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Make sure to clean up temp-dirs in 'weaver' moduleAlexander Kriegisch2021-04-091-2/+5
| | | | | | | | | Maven Clean now deletes '' directories if it finds any. Furthermore, AsynchronousFileCacheBackingTestSupport now not just deletes directory contents but also removes the empty corresponding directories afterwards. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Module 'asm-renamed' now deploys to GitHub PackagesAlexander Kriegisch2021-04-091-5/+2
| | | | | | | | | | | This means that instead of a system-scoped dependency we now have a regular one. The 'libx' module also downloads binary and source JARs redundantly into the libraries directory in order to be found there by other scripts and tests. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Get rid of some Maven warnings concerning plugins + dependenciesAlexander Kriegisch2021-03-301-10/+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-0/+2
| | | | | | | | | | | | 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-214-7/+6
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Add Java 15 class vile version to BCEL constants, adjust test tools etc.Alexander Kriegisch2021-03-161-7/+7
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Upgrade to ASM 9.1, delete obsolete ASM binariesAlexander Kriegisch2021-03-162-3/+3
| | | | | | | | | | | Keep only ASM 2.0 binary because it is still used in UnweavableTest which uses an old ASM API, e.g. with a ClassWriter constructor which no longer exists. Also add JarJar 1.3 library because it is needed by an Ant task in lib/asm/build.xml. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Fix 'ajdoc' tests for Java 15 buildAlexander Kriegisch2021-03-144-31/+31
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Make MoveInstructionsWeaveTestCase.testFancyHello pass when run twiceAlexander Kriegisch2021-03-131-9/+14
| | | | | | | | | | | Reset counter, just in case this test runs multiple times in one JVM. This can happen e.g. due to "run all tests" in IntelliJ IDEA, which directly runs this test class and als WeaverModuleTests, both of which implement junit.framework.TestCase. In that case, during the second run the counter would start at a higher base count, making the 2nd test run fail. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Remove call to System.outAnuj Dodhia2020-12-021-2/+1
|
* Typo fixesJerry James2020-09-142-3/+3
|
* Fix javadoc references to nonexistent fields, classes, or packagesJerry James2020-09-141-3/+3
|
* Fix misplaced or incorrect javadoc tagsJerry James2020-09-146-6/+5
|
* Fix misplaced or incorrectly nested HTML tagsJerry James2020-09-1411-33/+49
|
* Fix incorrect HTML entities in javadoc commentsJerry James2020-09-144-4/+4
|