aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Set version to 1.9.23-SNAPSHOTHEADmasterAlexander Kriegisch2024-05-111-1/+1
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Release AspectJ 1.9.22.1V1_9_22_1Alexander Kriegisch2024-05-111-1/+1
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Use aspect file/line matching for weave messages in some testsAlexander Kriegisch2024-04-132-12/+12
| | | | | | | | | | | | | | | Instead of creating dedicated ITs for #218, just use the new matching capabilities like this for good measure: <message kind="weave" aspectFile="MyAspect.java" aspectLine="8" .../> Tests affected: - Ajc165Tests::testFunkyPointcut_pr272233_2 - Bugs1920Tests::test_GitHub_214 Relates to #218. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Fix expected weave messages after previous changesAlexander Kriegisch2024-04-136-130/+142
| | | | | | | | Remove leading "weaveInfo", add missing "see also:" to weave messages. Relates to #218. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Implement source location matching for weave messages in XML testsAlexander Kriegisch2024-04-131-0/+4
| | | | | | | | WIP (work in progress). Closes #218. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Improve Ajc165Tests.testFunkyPointcut_pr272233_2Alexander Kriegisch2024-04-122-40/+62
| | | | | | | Add more funky pointcuts concerning 'void[]' and pointcuts matching arrays of generic types. Remove TODO after previously committed bugfix. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Make Ajc165Tests.testFunkyPointcut_pr272233_2 passAlexander Kriegisch2024-04-121-0/+1
| | | | | | | | | The test needs to expect the lately introduced Xlint:arrayCannotBeVoid warning to be thrown, because one of the pointcuts in tests/bugs165/pr272233/Iffy2.java contains a 'void[]' return type in a method signature. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Fix test after node traversal was improvedAlexander Kriegisch2024-04-123-4/+5
| | | | | | | | | | | | | | | | | | Due to the latest improvements, an error which was previously not thrown unexpectedly according to a source code comment in test aspect ParameterizedTypesInAnnotationPatterns.aj is now thrown for this kind of pointcut: staticinitialization(@(Foo || List<String>) String) Now the compiler correctly says: no static initialization join points for parameterized types, use raw type instead Relates to #221. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Add IT reproducing JoinPointImpl thread-locals memory leakAlexander Kriegisch2024-04-106-2/+146
| | | | | | Relates to #302. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Set version to 1.9.23-SNAPSHOTAlexander Kriegisch2024-03-231-1/+1
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Release AspectJ 1.9.22Alexander Kriegisch2024-03-231-1/+1
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Remove some TODOs from Java feature testsAlexander Kriegisch2024-03-236-18/+0
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Switch to Java 22 + add basic test suiteAlexander Kriegisch2024-03-2312-21/+566
| | | | | | | | | | | | The tests from Java 21 were copied to 22. Inactive ones were activated after their features under test were fixed/implemented. Preview ones were promotes to final ones for unnamed variables and patterns. TODO: Add tests for new Java 22 features and maybe adjust or amend existing feature tests, if preview or final characteristics have changed since Java 21. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Adjust 1.6.1 'testRunningBrokenCode_pr102733*' tests ECJ Java 22Alexander Kriegisch2024-03-235-62/+110
| | | | | | | | | | | | | | | | | | | | | Initially, these tests made sure that an old AJC bug causing incompatibility to ECJ when using `-proceedOnError` was fixed and there were no regressions. See also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=102733 Now with the Java 22 changes for JEP 463 "Implicitly Declared Classes and Instance Main Methods (Second Preview)" in JDT Core, source code is parsed into a significantly different AST structure than before, even when using compiler targets < 22. See also https://openjdk.org/jeps/463. One test has been temporarily adjusted to the byte code created by ECJ/AJC now. TODO: Revert/adjust after this upstream bug has been fixed: https://github.com/eclipse-jdt/eclipse.jdt.core/issues/2205 Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Reactivate test in AtAjAnnotationGenTestsAlexander Kriegisch2024-03-151-6/+3
| | | | | | | | In AtAjAnnotationGenTests.testRuntimePointcutsReferencingCompiledPointcuts, the classpath issues mentioned in the comments do not seem to exist anymore, with or without the removed lib/bcel/bcel.jar. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Remove BCEL files from 'lib' moduleAlexander Kriegisch2024-03-153-7/+7
| | | | | | | | Both bcel.jar and bcel-verifier.jar seem to be obsolete. Possible next step: Remove bcel-builder/verifier-src. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Set version to 1.9.22-SNAPSHOTAlexander Kriegisch2024-03-131-1/+1
|
* 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>