aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Release AspectJ 1.9.21.2V1_9_21_2Alexander Kriegisch2024-03-131-1/+1
|
* Avoid ThreadLocal memory leak in JoinPointImplAlexander Kriegisch2024-03-122-6/+7
| | | | | | | | | | | | | | | | | | | | | | | according to https://rules.sonarsource.com/java/tag/leak/RSPEC-5164/. Now, there no longer is a thread-local stack of AroundClosure instances, but rather a list of them, which can only grow but never shrink. Instead, we now have a thread-local (integer) list index, for every thread being initialised with pointing to the last element. I.e., every thread can unwind by decrementing the index while proceeding, independently of other threads. A positive side effect is that this approach also works for long-lived threads from thread pools, used by executor services. Hence, test Bugs199Tests.testAsyncProceedNestedAroundAdviceThreadPool_gh128, which was previously commented out, has been activated and passes, see #141. I am not sure if this brings @AspectJ style, non-inlined, nested around advice execution functionally on par with native ones, but at least for current scenarios it seems to work. Fixes #288, #141. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Add regression tests for inheritable thread-local memory leakAlexander Kriegisch2024-03-126-0/+206
| | | | | | | | | | | Leak was introduced in commit 3c80a36527, fixing #128, but introducing #288 instead, which was the lesser of two evils, but still bad for some users unwilling to use native AspectJ syntax for their aspects, avoiding the problem. Relates to #288. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Add Bugs1921Tests::testGitHub_285Alexander Kriegisch2024-03-024-0/+35
| | | | | | This is an additional reproducer for regression bug #285. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Fix: AllTestsAspectJ171 runs correct NewFeatures suiteAlexander Kriegisch2024-03-021-2/+0
| | | | | | | | | | While fixing #285, I noticed that *.ajc171.NewFeatures was never executed as part of the AspectJ test suite, because since 2012 falsely *.ajc1610.NewFeatures was imported and executed a second time instead. In addition to an outdated AspetJ weaver library in 'lib', this was one more factor why the regression bug was never spotted. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Add Ajc164Tests::testMultipleXMLFilesAlexander Kriegisch2024-02-226-0/+82
| | | | | | | | | | While researching how and what to document for AJJ option '-xmlConfigured', I needed to find out what happens in case of multiple XML config files. Result: They are merged. the new test case for the old 1.6.4 release verifies and documents that. It can also serve as an example for reference in case of user questions. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* New abstract class JavaVersionSpecificXMLBasedAjcTestCaseAlexander Kriegisch2024-02-1948-183/+446
| | | | | | | | | | | | | | | | Replaces now obsolete base classes - XMLBasedAjcTestCaseForJava[n]OrLater, - XMLBasedAjcTestCaseForJava[n]Only. The new class is parametrised with minimum and maximum Java version and hence can replace all the other classes. This does not only apply the DRY principle, but also makes adding tests for new Java versions less tedious. By chance, I also noticed missing sanity tests for Java 12, which I added as a little drive-by benefit. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Remove most MINOR_*, MINOR_* BCEL class file versionsAlexander Kriegisch2024-02-1924-78/+84
| | | | | | | | | | | in favour of Constants.ClassFileVersion.of(int, int). The few ones retained are used from production code, the vast majority of removed ones only from test code. This gets rid of yet another 'AspectJ_JDK_Update' tag. One less place to check and update with each newly supported Java version. :-) Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* LangUtil: remove methods like 'is11VMOrGreater', 'is1dot5VMOrGreater'Alexander Kriegisch2024-02-1914-31/+30
| | | | | | | | | | Replace them by a uniform method 'isVMGreaterOrEqual(double)', also overloaded for int. This gets rid of one 'AspectJ_JDK_Update' tag. One less place to check and update with each newly supported Java version. :-) Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Add 'AspectJ_JDK_Update' hint in various placesAlexander Kriegisch2024-02-192-0/+14
| | | | | | | | | | | | | | | | | | | | The hint is meant to help AspectJ developers identify the places where there are to-dos for releases supporting new Java versions. This is work in progress, new tags can be added wherever necessary in the future. But for now, the most important places should be covered: - AJC version string - Test infrastructure (test suites, classes and XML files) - BCEL class file version MAJOR_*, MINOR_* constants - AjcTask constants for compiler source, target, release - LangUtil::is*VMOrGreater methods - ASM and JDT Core dependency versions - CI workflow file - Release notes The to-do to check the tagged places is also mentioned in RELEASE.md. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Globally replace "http:" by "https:" in non-XML filesAlexander Kriegisch2024-02-1544-116/+110
| | | | | | | | | Maybe, the XML files and Maven wrapper files will follow. First, let us find out if this breaks the build, maybe some tests are asserting on "http:". But there, the replacement would also have taken place, so probably it just works. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Replace links to https://www.eclipse.org/aspectj/doc/nextAlexander Kriegisch2024-02-152-2/+2
| | | | | | | This part of the website is outdated and will be deleted. Instead, link to ADOCs right in the GitHub repository. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Set version to 1.9.22-SNAPSHOTAlexander Kriegisch2024-02-141-1/+1
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Release 1.9.21.1V1_9_21_1Alexander Kriegisch2024-02-141-1/+1
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Add tests for underscores in pointcuts on Java 21+Alexander Kriegisch2024-02-133-0/+100
| | | | | | | See also: https://github.com/eclipse-aspectj/eclipse.jdt.core/commit/5d2f2aecd2 Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* ITD inner type tests: replace '_' by '__'Alexander Kriegisch2024-02-1335-97/+90
| | | | | | | | | Classes and methods named '_' are no longer allowed in ECJ, obviously also not for old target versions like 1.5. This probably is due to the added support for unnamed patterns and classes in the latest upstream JDT Core merge. Therefore, we simply rename '_' to '__'. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Update Java 21 string patterns tests after JDT Core bugfixAlexander Kriegisch2024-02-121-6/+2
| | | | | | | https://github.com/eclipse-jdt/eclipse.jdt.core/issues/1719 was fixed. Change test to expect the correct strings for processed string pattern. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* ajc1921.xml: Add AspectJ version hint to #279 test caseAlexander Kriegisch2024-02-091-1/+1
| | | | | | | | "same class woven concurrently in parallel-capable classloader". Relates to #279. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* IT reproducing GitHub issue 279Alexander Kriegisch2024-02-089-2/+151
| | | | | | | | | Test "same class woven concurrently in parallel-capable classloader" reproduces #279. Originally taken and modified from: https://gitlab.com/urisimchoni/aspectj-parallel-issue Co-authored-by: Uri Simchoni <urisimchoni@gmail.com> Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Replace old by new AspectJ GitHub URLAlexander Kriegisch2024-02-089-18/+18
| | | | | | github.com/eclipse/org.aspectj -> github.com/eclipse-aspectj/aspectj Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Remove some old files relating to AspectJ Debugger ajdbAlexander Kriegisch2024-02-0111-1285/+0
| | | | | | | | If ajdb ever existed and was part of the product, it must have been 20+ years ago. There are still some references to it in old release notes and unused Ant and text files, but that is OK for now. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Workaround for defining classes during LTWAlexander Kriegisch2024-01-2910-68/+77
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Move docs examples directory two levels upAlexander Kriegisch2024-01-064-32/+32
| | | | | | Now, the location more closely resembles where it is on the website. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Bulk-rename release read-me files to version numbers with dotsAlexander Kriegisch2024-01-061-1/+1
| | | | | | | | | Also rename references. E.g. - RELEASE-11 -> RELEASE-1.1 - RELEASE-1810 -> RELEASE-1.8.10 - RELEASE-1921 -> RELEASE-1.9.21 Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Globally fix spelling error "dependancy/dependancies"Alexander Kriegisch2024-01-061-1/+1
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Globally replace HTTP links to eclipse.org by HTTPSAlexander Kriegisch2024-01-068-74/+69
| | | | 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>
* Remove some TODOs from tests after upstream JDT Core fixesAlexander Kriegisch2023-12-144-4/+4
| | | | 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>
* Add tests for Java 21 unnamed classes and instance methodsAlexander Kriegisch2023-12-115-0/+80
| | | | | | TODO: Activate the unnamed class test after https://github.com/eclipse-jdt/eclipse.jdt.core/issues/1106 is done. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Add tests for Java 21 unnamed patternsAlexander Kriegisch2023-12-114-0/+237
| | | | | | TODO: Activate after https://github.com/eclipse-jdt/eclipse.jdt.core/issues/893 is done. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Add tests for Java 21 string patternsAlexander Kriegisch2023-12-114-2/+309
| | | | | | | | TODO: Due to eclipse-jdt/eclipse.jdt.core#1719, one line per test is currently rendered incorrectly. After the upstream fix, change "\Bill \Duck" to "Bill Duck". Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* 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>
* Reactivate some tests on JDK 21 after upstream fixAlexander Kriegisch2023-11-273-28/+1
| | | | | | | https://github.com/eclipse-jdt/eclipse.jdt.core/issues/1466 has finally been fixed. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* AllTests19 suite: add AllTestsAspectJ1921Alexander Kriegisch2023-11-271-0/+2
| | | | | | | Until now, the CI build did not run Java 21 tests, but they look OK locally. Now, let's find out what GitHub Actions says. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Add missing file RecordPatternsPreview1ExhaustivenessOK1.java for JDK 21Alexander Kriegisch2023-11-271-0/+34
| | | | | | | | This file was missing, which did not trigger an error in CI builds, because AllTestsAspectJ1921 was not part of the AllTests19 suite before. The latter will be fixed in the next commit. 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>
* Enable some tests after J19 problems were fixed for J21Alexander Kriegisch2023-11-055-20/+52
| | | | | | | | | | Two test classes which had redundant default clauses for switch with record patterns were copied from the java19 to the java21 directory and the redundant clauses deactivated, i.e. the test now run as originally intended. For older JDK versions, the old tests still stay active in order to document the old state of affairs. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Make all existing tests run on JDK 21Alexander Kriegisch2023-10-056-488/+393
| | | | | | | | | | | This mostly affects pattern matching for switch and record patterns. Two tests which were working before for pattern matching for switch (preview 4), started to fail, so the corresponding code was commented out and https://github.com/eclipse-jdt/eclipse.jdt.core/issues/1466 recorded. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Move some 1.9.20.1 bug tests to correct directoryAlexander Kriegisch2023-10-055-5/+9
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Add test infrastructure for Java 21 (WIP)Alexander Kriegisch2023-10-0510-3/+908
| | | | | | | The tests and their XML definitions are still copy & paste and need to be cleaned up. Separate Java 21 feature tests do not exist yet. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Beautify sanity tests using bytecode level constantsAlexander Kriegisch2023-10-0512-29/+45
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Remove old '.cvsignore' filesAlexander Kriegisch2023-09-277-10/+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>
* ajc162.xml: Fix test failing after previous bugfixAlexander Kriegisch2023-08-231-2/+2
| | | | | | | | | | | | | A change made to ajc162.xml in commit 43cb1e2f has been reverted and improved after the recent negated type pattern fix. Relates to #257. The pointcut 'call(!void *.*(..)) && this(src) && target(dst)' actually does match method call 'payloadClass.getPayload()' within the around-advice in GenericClassInAdvice itself. Improvement: Activate '-showWeaveInfo' and verify weaving message. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Add regression test for #257Alexander Kriegisch2023-08-233-0/+174
| | | | | | Relates to #257. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>