aboutsummaryrefslogtreecommitdiffstats
path: root/tests/java5
Commit message (Collapse)AuthorAgeFilesLines
* Workaround for defining classes during LTWAlexander Kriegisch2024-01-292-34/+39
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Fix tests using Javac via Ant using source/target < 1.8Alexander Kriegisch2023-08-061-1/+1
| | | | | | Since JDK 20, targets older than 1.8 are no longer supported by Javac. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Fix inline accessor method bug in BcelAccessForInlineMungerAlexander Kriegisch2023-08-061-3/+5
| | | | | | | | | | 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>
* Fix tests using Javac using source/target 1.7Alexander Kriegisch2023-06-241-4/+4
| | | | | | Javac 20+ no longer supports 1.7. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Upgrade license from CPLv1/EPLv1 to EPLv2Alexander Kriegisch2021-06-0459-294/+293
| | | | | | | This was required by the Eclipse team as one precondition for the next release. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Replace use of ASM-renamed by original ASMAlexander Kriegisch2021-05-161-4/+4
| | | | | | | | | | | | 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>
* Remove ASM 2.0 dependency from AtAjLTWTests::testLTWUnweavableAlexander Kriegisch2021-03-292-28/+25
| | | | | | | | | | | | | | | | | | | | The test class UnweavableTest used ASM 2.0 API. I upgraded in two ways: 1. Now the ASM 9.1 API is used. Probably works with much older versions too (just not as old as 2.0), as long as the method and constructor signatures are the same). 2. The class now uses the AspectJ version of ASM (i.e. package names aj.org.objectweb.asm.*) and therefore can just use ASM as it is on the classpath for module 'tests' already. There is no more need to manually add '<pathelement path="${aj.root}/lib/asm/asm-2.0.jar"/>' to the Ant build script for that test. Consequently, asm-2.0.jar can be eliminated from Git SCM completely, because it was only used in this one test. BTW, I also removed some deprecated API and other types of warnings in UnweavableTest. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Make all tests run on Java 16 via '-add-opens' JVM optionjava16-add-opensAlexander Kriegisch2021-03-231-8/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to JEP 260 (Encapsulate Most Internal APIs), aspect weaving on Java 16 now requires '--add-opens java.base/java.lang=ALL-UNNAMED' on the command line. Otherwise there will be illegal access exceptions for some internal API calls AspectJ needs, most prominently when trying to define classes in other packages or modules. This had to be done on several levels: - Maven Surefire: running tests in a JVM directly forked by Surefire. In order to make this backwards compatible, I added two profiles with JDK-level-dependent auto-activation, one 8-15 and one 16+. In the latter a property containing the JVM parameter is defined, in the former it is empty, i.e. the JVM is started without the parameter. In Java 8 the parameter did not even exist, in Java 9+ we could use it, but we need to test how users use AspectJ. - RunSpec: Whenever an XML test is declared to use '<run>', we need to determine the current JVM version and again dynamically add the parameter when forking the target JVM. - AntSpec: Whenever an XML test is declared to use '<ant>', we need to determine the current JVM version dynamically add two properties usable from within Ant scripts: 'aj.addOpensKey' and 'aj.addOpensValue'. Unfortunately, Ant needs to use two '<argLine>' parameters, because the two parts of the option are separated by a space character. - Ant scripts: When triggered by an AntSpec, each Ant target using LTW needs to manually set <jvmarg value="${aj.addOpensKey}"/> <jvmarg value="${aj.addOpensValue}"/> for each '<java>' task. It was quite tedious to find all(?) of them. TODO: In the AspectJ 1.9.7 release notes we need to document that this parameter is now needed for LTW. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Updated with Java12 supportAndy Clement2019-04-031-4/+4
|
* version bump to 1.6Andy Clement2017-09-271-4/+4
|
* Various changes to get tests passing on 1.8 and 1.9Andy Clement2017-09-241-0/+1
|
* Fix 436653: conditional aspect activation plus various polishAndy Clement2014-10-066-7/+22
| | | | | | | | | | | | | | Modified test expectation system so it is possible to say the test cares about one particular message and the rest do not matter (prefix message string with '*') - crude but quick. Polished many places to exploit generics Upgraded all the tests to work on Java8 - some serious changes regarding ajdoc on Java8. Hopefully it has stayed backwards compatible with earlier JDK versions (e.g. if using AspectJ 1.8.3+ with a JDK less than 8) but no explicit testing done for this.
* Upgrade to JDT 1.8.0 compilerAndy Clement2014-03-181-2/+2
|
* e37 related changesaclement2011-12-101-4/+5
|
* remove wierdness about sometimes and sometimes not getting a param on the ↵aclement2008-12-151-2/+2
| | | | default ctor
* to continue to fail, with new ctor vis checkingaclement2008-12-081-0/+1
|
* prevents funny behaviour on JDK1.6aclement2008-08-081-5/+5
|
* fix error revealed by allowing mixed syntaxesaclement2008-06-171-0/+2
|
* Stupid bloody tests that don't tell you why they failed, I HATE THEM - fixed ↵aclement2008-06-041-1/+2
| | | | this one in one place.
* AspectJ6: simplifiedaclement2008-01-162-3/+9
|
* Test LTW dump for JSPsmwebster2007-01-222-0/+17
|
* improved - hopefully get more info as to why currently failing on the build ↵aclement2006-10-101-0/+3
| | | | machine
* Bug 158205 "NullPointerException when weaving with bootstrap agent" (improve ↵mwebster2006-10-021-1/+1
| | | | declare parents LTW tests)
* Bug 158205 "NullPointerException when weaving with bootstrap agent" (remove ↵mwebster2006-10-021-16/+41
| | | | use of -Daj5.def)
* 154054 testcode and fix: noticing changes in around advice and forcing full ↵aclement2006-09-221-8/+12
| | | | builds
* 141556#11 - reworked messagehandler with 'ignore' function! (wooo) - hope ↵aclement2006-08-251-0/+3
| | | | Matthew doesnt complain.
* Bug 150271 "Allow multiple levels of LTW information" (make weaving/not ↵mwebster2006-08-235-10/+10
| | | | weaving messages debug and add -debug to options for aop.xml)
* tests (?) and fixes for 152873 - optimized check for @AJ aspects in LTWaclement2006-08-083-0/+23
|
* Bug 150131 "org.aspectj.ajde.core testcases create "out" directory in ↵mwebster2006-08-021-21/+0
| | | | project root" (remove redundant logic that created result.ser"
* Bug 151938 "Handle Duplicate -javaagent entries more gracefully" (ignore ↵mwebster2006-08-015-0/+61
| | | | duplicate agents)
* fixed decp bug and problem with 1.5 IBM VMaclement2006-06-191-0/+1
|
* fix for 120739mwebster2006-06-017-1/+27
|
* update license to EPLacolyer2006-06-016-12/+12
|
* fix for pr141945, misleading message re. aop.xmlacolyer2006-05-161-1/+1
|
* attempt to remove the damn results.ser file.aclement2006-03-281-0/+1
|
* switched around.aclement2006-03-271-1/+1
|
* testcode for 121575aclement2005-12-213-0/+69
|
* merge of RB_V1_5_0 changes back into HEADacolyer2005-12-192-3/+2
|
* fix NPE in mixing style (can be in concrete aspect from code style as well)avasseur2005-12-193-1/+46
|
* includes an error on purpose (class is not static)aclement2005-12-191-2/+2
|
* this was all corrupted testsavasseur2005-12-191-2/+2
|
* this was all corrupted testsavasseur2005-12-192-9/+8
|
* more tests.aclement2005-12-193-2/+41
|
* slightly modifiedaclement2005-12-193-6/+9
|
* fix new syntax @decpavasseur2005-12-192-4/+8
|
* rearchitect @decpavasseur2005-12-192-4/+6
|
* merge of changes from 1.5.0 branch into HEADacolyer2005-12-192-3/+3
|
* Comparable test programs.aclement2005-12-196-0/+166
|
* making the tests more resilient to legitimate cross-vm differencesacolyer2005-12-154-35/+135
|
* fixes inefficient ordering of tests in SignaturePattern (that I ↵acolyer2005-12-142-16/+8
| | | | inadvertantly introduced earlier), and corrects @DeclareParents impl in AJTypeSystem :- fields should NOT be shown, and nor should non-interface members.