aboutsummaryrefslogtreecommitdiffstats
path: root/weaver
Commit message (Collapse)AuthorAgeFilesLines
* Workaround for defining classes during LTWAlexander Kriegisch2024-01-291-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | Overhaul ClassLoaderWeavingAdaptor to use statically initialised Unsafe instances and method handles pointing to their 'defineClass' methods. Those now work universally on JDKs 8-21. In older JDKs, the method used to be in sun.misc.Unsafe, in more recent ones on jdk.internal.misc.Unsafe. It is challenging to fetch instances, especially as reflection protection and module boundaries have been increased in the JDK progressively. But finally, a solution was adapted from Byte Buddy (BB). Kudos to BB author Rafael Winterhalter. The previous solution to use ClassLoader::defineClass and require '--add-opens' is no longer necessary for the first time since it became necessary in AspectJ 1.9.7 with Java 16 support. Add org.ow2.asm:asm-common as a dependency everywhere org.ow2.asm:asm was used before. Maybe that is too many places, but no worse than before. Add missing dependency on loadtime to aspectjweaver. This kept a build like "mvn install -am -pl aspectjweaver" from picking up changed loadtime classes. Fixes #117. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Set version to 1.9.21.1-SNAPSHOTAlexander Kriegisch2023-12-151-1/+1
| | | | | | | Currently, the situation looks more like a Java 21 maintenance release than directly a Java 22 release. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Set version to 1.9.22-SNAPSHOTAlexander Kriegisch2023-12-111-1/+1
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Release AspectJ 1.9.21V1_9_21Alexander Kriegisch2023-12-111-1/+1
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Simple regression test unit test for #266Alexander Kriegisch2023-12-101-0/+51
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Set exception root cause in ExtensibleURLClassLoader::findClassAndy Russell2023-12-101-1/+1
| | | | Fixes #266.
* Set version to 1.9.21-SNAPSHOT againAlexander Kriegisch2023-12-021-1/+1
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Release candidate 1.9.21.RC1V1_9_21_RC1Alexander Kriegisch2023-12-021-1/+1
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Set version 1.9.21-SNAPSHOTAlexander Kriegisch2023-11-191-1/+1
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Release milestone 1.9.21.M1V1_9_21_M1Alexander Kriegisch2023-11-191-1/+1
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Remove old '.cvsignore' filesAlexander Kriegisch2023-09-271-2/+0
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Set version to 1.9.21-SNAPSHOTAlexander Kriegisch2023-09-041-1/+1
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* AspectJ release 1.9.20.1Alexander Kriegisch2023-09-041-1/+1
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Set version to 1.9.21-SNAPSHOTAlexander Kriegisch2023-08-161-1/+1
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Release 1.9.20V1_9_20Alexander Kriegisch2023-08-161-1/+1
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Improve error message in LazyClassGen.getJavaClassBytesIncludingReweavableAlexander Kriegisch2023-08-063-11/+17
| | | | | | | | | | No longer report "Unable to find ASM classes", if simply an ASM processing error occurred. In that case, report "Error processing class file". Relates to #250. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Fix inline accessor method bug in BcelAccessForInlineMungerAlexander Kriegisch2023-08-061-5/+9
| | | | | | | | | | Make sure to create one ajc$inlineAccessMethod per identically named (overloaded) private aspect method in BcelAccessForInlineMunger.createOrGetInlineAccessorForMethod. Fixes #250. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Use relocated ASM class names in BCException messageAlexander Kriegisch2023-08-041-5/+8
| | | | | | Fixes #251. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* BcelTypeMunger.getRealMemberForITDFromAspect code cosmeticsAlexander Kriegisch2023-06-261-33/+24
| | | | | | Relates to #246. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Correctly identify ITD method signatures in weaverAlexander Kriegisch2023-06-261-7/+1
| | | | | | | | | | by removing faulty condition 'if (isCtorRelated)' from BcelTypeMunger.getRealMemberForITDFromAspect, see comment https://github.com/eclipse-aspectj/aspectj/issues/246#issuecomment-1605999896. Fixes #246. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Fix GitHub #214Alexander Kriegisch2023-01-211-1/+1
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* 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>