]> source.dussan.org Git - aspectj.git/log
aspectj.git
2 years agoFix AjcTaskTest by correctly identifying snapshot versions
Alexander Kriegisch [Thu, 24 Mar 2022 11:39:16 +0000 (18:39 +0700)]
Fix AjcTaskTest by correctly identifying snapshot versions

This avoids the corresponding "bad version number found in" warnings.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoSet version to 1.9.10-SNAPSHOT
Alexander Kriegisch [Thu, 24 Mar 2022 10:56:14 +0000 (17:56 +0700)]
Set version to 1.9.10-SNAPSHOT

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoSet version to 1.9.9 V1_9_9
Alexander Kriegisch [Thu, 24 Mar 2022 10:46:53 +0000 (17:46 +0700)]
Set version to 1.9.9

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoBump JDT Core to 1.9.9
Alexander Kriegisch [Thu, 24 Mar 2022 10:24:42 +0000 (17:24 +0700)]
Bump JDT Core to 1.9.9

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoUpdate README-199.html
Alexander Kriegisch [Thu, 24 Mar 2022 09:04:45 +0000 (16:04 +0700)]
Update README-199.html

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoAdd AllTestsAspectJ199.suite() to AllTests19
Alexander Kriegisch [Thu, 24 Mar 2022 09:04:03 +0000 (16:04 +0700)]
Add AllTestsAspectJ199.suite() to AllTests19

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoAdd JDT Core and bcel-builder to test classpath
Alexander Kriegisch [Thu, 24 Mar 2022 08:25:37 +0000 (15:25 +0700)]
Add JDT Core and bcel-builder to test classpath

At present, no tests are failing without those resources, but for good
measure, I added them anyway, because then the same path could in the
future also be used for stand-alone compilation tests which are not
triggered in-process via AJDT interface but, not unlike "full LTW"
test execution mode, in a separate JVM.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoUpgrade to latest JDT Core Java 18 changes, activate J18 preview tests
Alexander Kriegisch [Thu, 24 Mar 2022 08:16:29 +0000 (15:16 +0700)]
Upgrade to latest JDT Core Java 18 changes, activate J18 preview tests

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoRename testGitHub_125 to testCompilerCanReopenClosedJARs_gh125
Alexander Kriegisch [Wed, 23 Mar 2022 08:52:26 +0000 (15:52 +0700)]
Rename testGitHub_125 to testCompilerCanReopenClosedJARs_gh125

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoMove GH-128 tests from 1.9.8 to 1.9.9 bugs test suite after merge
Alexander Kriegisch [Wed, 23 Mar 2022 08:51:42 +0000 (15:51 +0700)]
Move GH-128 tests from 1.9.8 to 1.9.9 bugs test suite after merge

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoMerge branch 'master' into java-18
Alexander Kriegisch [Wed, 23 Mar 2022 08:44:00 +0000 (15:44 +0700)]
Merge branch 'master' into java-18

# Conflicts:
# tests/src/test/java/org/aspectj/systemtest/ajc198/Bugs198Tests.java
# tests/src/test/resources/org/aspectj/systemtest/ajc198/ajc198.xml

2 years agoIgnore testAsyncProceedNestedAroundAdviceThreadPool_gh128 for now
Alexander Kriegisch [Wed, 23 Mar 2022 07:51:54 +0000 (14:51 +0700)]
Ignore testAsyncProceedNestedAroundAdviceThreadPool_gh128 for now

Out of scope for PR #132, future work for issue #141.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoName annotation vs native style aspects uniformly in github_128 tests
Alexander Kriegisch [Tue, 1 Mar 2022 04:31:17 +0000 (11:31 +0700)]
Name annotation vs native style aspects uniformly in github_128 tests

Trying to find the difference between byte code generated by AJC for
functionally identical annotation vs native style aspect, I move the
aspects into subdirectories in order to be able to name them
identically. This way, when decompiling them with javap or Fernflower it
is easier to diff them later.

Why the decompilation? Because for the thread pool testing scenario
native syntax passes while annotation syntax fails. I.e., we need to
find the difference. That can be done by reading source code, if you
know where to look, or by starting with reverse engineering in order to
first understand more and look at the code later.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoExpand "asynchronous proceed for nested around-advice" to 4 scenarios:
Alexander Kriegisch [Mon, 28 Feb 2022 11:44:07 +0000 (18:44 +0700)]
Expand "asynchronous proceed for nested around-advice" to 4 scenarios:

1. @AspectJ syntax, threads created inside advice code
2. @AspectJ syntax, submit runnable to thread pool
3. native syntax, threads created inside advice code
4. native syntax, submit runnable to thread pool

Scenarios 1, 3 and 4 are passing, while 2 is failing.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoAdd test "asynchronous proceed for nested around-advice chain"
Alexander Kriegisch [Mon, 28 Feb 2022 02:25:46 +0000 (09:25 +0700)]
Add test "asynchronous proceed for nested around-advice chain"

Relates to #128.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoRunSpec: allow '<stdout ordered="no">'
Alexander Kriegisch [Mon, 28 Feb 2022 02:23:44 +0000 (09:23 +0700)]
RunSpec: allow '<stdout ordered="no">'

Previously 'ordered="no"' was only permitted for 'stderr'. We need this
for tests with asynchronous log output on standard error.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoMake Stack<AroundClosure> in JoinPointImpl InheritableThreadLocal
Alexander Kriegisch [Mon, 28 Feb 2022 00:07:08 +0000 (07:07 +0700)]
Make Stack<AroundClosure> in JoinPointImpl InheritableThreadLocal

In case of asynchronous proceeding for nested around-advice, child
threads need copies of the original around-closure stack. Otherwise, the
target method thread will have popped the stack empty after unwinding.

Fixes #128.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoAdd TODO to maven.yml for switch to JDK 18 final
Alexander Kriegisch [Wed, 23 Mar 2022 05:53:17 +0000 (12:53 +0700)]
Add TODO to maven.yml for switch to JDK 18 final

TODO: switch from 18-ea to 18, as soon as Temurin offers the download
on https://adoptium.net/releases.html.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoMake sure that program arguments are passed through in full LTW mode
Alexander Kriegisch [Wed, 23 Mar 2022 05:51:36 +0000 (12:51 +0700)]
Make sure that program arguments are passed through in full LTW mode

This fixes e.g. LTWTests.testDeclareAbstractAspect, which passes on
names of ITD methods to the test program, which in turn executes those
methods via reflection.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoIntroduce AjcTestCase.DEFAULT_FULL_LTW_CLASSPATH_ENTRIES
Alexander Kriegisch [Wed, 23 Mar 2022 05:49:24 +0000 (12:49 +0700)]
Introduce AjcTestCase.DEFAULT_FULL_LTW_CLASSPATH_ENTRIES

In 'useFullLTW' mode, aspectjweaver.jar is a Java agent. Therefore, what
is contained in there does not need to be on the classpath.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoFix more LTW tests
Alexander Kriegisch [Wed, 23 Mar 2022 04:55:22 +0000 (11:55 +0700)]
Fix more LTW tests

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoA few dozen more tests need 'useFullLTW' mode
Alexander Kriegisch [Wed, 23 Mar 2022 03:08:50 +0000 (10:08 +0700)]
A few dozen more tests need 'useFullLTW' mode

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoAJDT Core: use JUnit 4 from class path instead of 3.8 from lib/junit
Alexander Kriegisch [Wed, 23 Mar 2022 01:45:46 +0000 (08:45 +0700)]
AJDT Core: use JUnit 4 from class path instead of 3.8 from lib/junit

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoAtAjLTWTests: 4 test cases switched to 'useFullLTW' mode
Alexander Kriegisch [Wed, 23 Mar 2022 01:43:57 +0000 (08:43 +0700)]
AtAjLTWTests: 4 test cases switched to 'useFullLTW' mode

After the Java 18 JDT Core upgrade, some LTW tests are failing and
have to be switched from in-process to full LTW mode due to them now
obviously calling some code paths which need '--add-opens'.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoFix broken 'useFullLTW' test mode
Alexander Kriegisch [Wed, 23 Mar 2022 01:37:16 +0000 (08:37 +0700)]
Fix broken 'useFullLTW' test mode

It was referring to a no longer existent weaver under
aj-build/dist/tools/lib/aspectjweaver.jar, which now has been replaced
by the new file lib/aspectj/lib/aspectjweaver.jar.

Several tests were broken, not finding the agent. But because those
tests make no assertions, nobody ever noticed. Only when I had to change
some LTW tests from in-process to full LTW mode (see next commit) due to
them now obviously calling some code paths which need '--add-opens', I
even noticed the problem.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoUse 1.9.9-SNAPSHOT AspectJ libraries in libs/test, libs/aspectj/lib
Alexander Kriegisch [Wed, 23 Mar 2022 01:26:45 +0000 (08:26 +0700)]
Use 1.9.9-SNAPSHOT AspectJ libraries in libs/test, libs/aspectj/lib

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoUse static imports for file and path separator constants
Alexander Kriegisch [Wed, 23 Mar 2022 01:14:58 +0000 (08:14 +0700)]
Use static imports for file and path separator constants

It makes concatenated paths a little more readable.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoUse '-Djava.security.manager=allow' on Java 18+ (JEP 411)
Alexander Kriegisch [Mon, 21 Mar 2022 04:30:38 +0000 (11:30 +0700)]
Use '-Djava.security.manager=allow' on Java 18+ (JEP 411)

JEP 411: Deprecate the Security Manager for Removal,
see https://openjdk.java.net/jeps/411.

As of Java 18, the new API for blocking System.exit is not available
yet, see https://bugs.openjdk.java.net/browse/JDK-8199704.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoPrepare code, tests and docs for Java 18
Alexander Kriegisch [Mon, 21 Mar 2022 03:45:00 +0000 (10:45 +0700)]
Prepare code, tests and docs for Java 18

- JDT Core dependency in pom.xml
- Constants.java
- LangUtil.java
- AjcTask.java
- messages_aspectj.properties

- XMLBasedAjcTestCaseForJava17Only.java
- XMLBasedAjcTestCaseForJava18*.java
- tests/bugs199
- tests/features199

- JavaVersionCompatibility.md
- README-199.html

- GitHub CI build

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoDocs: add AspectJ Java version compatibility table
Alexander Kriegisch [Sat, 19 Mar 2022 06:25:23 +0000 (13:25 +0700)]
Docs: add AspectJ Java version compatibility table

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoBump actions/checkout from 2 to 3
Alexander Kriegisch [Mon, 7 Mar 2022 05:47:12 +0000 (12:47 +0700)]
Bump actions/checkout from 2 to 3

Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoBump actions/setup-java from 1 to 3, use Temurin, drop Java 14
Alexander Kriegisch [Mon, 7 Mar 2022 04:33:06 +0000 (11:33 +0700)]
Bump actions/setup-java from 1 to 3, use Temurin, drop Java 14

Adopt OpenJDK moved to Eclipse Temurin and is no longer updated. Temurin
builds for JDK 14 are however not available. Therefore, we drop the JDK
14 CI build.

Bumps [actions/setup-java](https://github.com/actions/setup-java) from 1 to 3.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](https://github.com/actions/setup-java/compare/v1...v3)

---
updated-dependencies:
- dependency-name: actions/setup-java
- dependency-type: direct:production
- update-type: version-update:semver-major

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoNo automatic builds for Dependabot PRs
Alexander Kriegisch [Mon, 7 Mar 2022 04:50:43 +0000 (11:50 +0700)]
No automatic builds for Dependabot PRs

Otherwise, Dependabot would run builds whenever something is pushed on
master and it rebases its PR. It is still possible to just click on the
skipped workflow in the PR and then issue "re-run all jobs" in order to
perform a build.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoAdd GitHub Dependabot
Alexander Kriegisch [Mon, 7 Mar 2022 04:24:24 +0000 (11:24 +0700)]
Add GitHub Dependabot

It will create PRs for Maven and GitHub action updates. Of course, we
cannot simply merge the PRs, because Dependabot has not singed an
Eclipse CLA, but at least we know about updates and how they affect the
build result. Then we can decide to clone the changes and commit them
manually.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoFix poor variable name
Andy Clement [Sat, 26 Feb 2022 23:01:15 +0000 (15:01 -0800)]
Fix poor variable name

2 years agoMerge pull request #130 from turbanoff/cleanup_too_weak_variable_types
Andy Clement [Sat, 26 Feb 2022 22:57:23 +0000 (14:57 -0800)]
Merge pull request #130 from turbanoff/cleanup_too_weak_variable_types

Cleanup redundant type casts, due to too weak variable type declaration

2 years agoCleanup redundant type casts, due to too weak variable type declaration 130/head
Andrey Turbanov [Sat, 26 Feb 2022 11:17:56 +0000 (14:17 +0300)]
Cleanup redundant type casts, due to too weak variable type declaration

2 years agoMerge pull request #114 from turbanoff/use_generics_in_taskdefs_module
Andy Clement [Fri, 25 Feb 2022 21:29:01 +0000 (13:29 -0800)]
Merge pull request #114 from turbanoff/use_generics_in_taskdefs_module

Update 'taskdefs' code to use generics

2 years agoMerge pull request #127 from kriegaex/gh-125
Andy Clement [Fri, 25 Feb 2022 21:28:33 +0000 (13:28 -0800)]
Merge pull request #127 from kriegaex/gh-125

Fix classpath JAR close & re-open problem in AJC

2 years agoBump JDT Core to 1.9.9-SNAPSHOT, incorporating #125 fixes 127/head
Alexander Kriegisch [Wed, 23 Feb 2022 11:02:19 +0000 (18:02 +0700)]
Bump JDT Core to 1.9.9-SNAPSHOT, incorporating #125 fixes

This should make Bugs198Tests.testGitHub_125 green, fixing problem #125
in AspectJ.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoRegression test for #125: Bugs198Tests.testGitHub_125
Alexander Kriegisch [Wed, 23 Feb 2022 14:48:04 +0000 (21:48 +0700)]
Regression test for #125: Bugs198Tests.testGitHub_125

This test fails when run against AspectJ 1.9.8 with JDT Core 1.9.8.RC3.
It passes when using the latest JDT Core 1.9.9-SNAPSHOT. It sets system
property 'org.aspectj.weaver.openarchives=20', provoking open classpath
JAR file exhaustion when compiling a simple class with AJC, i.e. JARs
are being forcibly closed and automatically re-opened, as soon as they
are needed. Before the JDT Core bugfix, this test causes:

java.lang.NullPointerException
  at ....compiler.batch.ClasspathJmod.getModulesDeclaringPackage

With the bugfix incorporated into AspectJ Tools, the problem is gone.

Note: New test dependency 'io.github.bmuskalla:scoped-system-properties'
helps to test compilation with the temporarily changed global system
property in isolation, saving the environment in a thread-local
variable and later cleanly restoring the original values again. If we
ever switch to parallel test execution, this would otherwise influence
other tests and potentially cause weird side effects. Better safe than
sorry.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoMove some tests from Ajc198TestsJava to Bugs198Tests
Alexander Kriegisch [Wed, 23 Feb 2022 14:35:40 +0000 (21:35 +0700)]
Move some tests from Ajc198TestsJava to Bugs198Tests

They were accidentally stored in thw wrong test class, not just because
they are bug regression tests, not 1.9.8 features, but also because they
are meant to work on Java 5+, not on Java 17+ like the ones in
Ajc198TestsJava.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoMerge pull request #121 from kriegaex/release-198
Andy Clement [Thu, 17 Feb 2022 22:07:27 +0000 (14:07 -0800)]
Merge pull request #121 from kriegaex/release-198

Release 1.9.8

2 years agoSet version to 1.9.9-SNAPSHOT 121/head
Alexander Kriegisch [Fri, 11 Feb 2022 01:39:47 +0000 (08:39 +0700)]
Set version to 1.9.9-SNAPSHOT

2 years agoSet version to 1.9.8 V1_9_8
Alexander Kriegisch [Fri, 11 Feb 2022 01:38:41 +0000 (08:38 +0700)]
Set version to 1.9.8

2 years agoUpdate README-198.html and set release date
Alexander Kriegisch [Fri, 11 Feb 2022 01:22:11 +0000 (08:22 +0700)]
Update README-198.html and set release date

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoIDE.md points to AJDT Eclipse update sites
Alexander Kriegisch [Sat, 29 Jan 2022 02:01:43 +0000 (09:01 +0700)]
IDE.md points to AJDT Eclipse update sites

Because the Jenkins builds for Eclipse now exist and deploy to the
correct update sites, we no longer need the AspectJ.dev ones.

2 years agoImprove annotation style if pointcut handling
Andy Clement [Mon, 31 Jan 2022 23:47:27 +0000 (15:47 -0800)]
Improve annotation style if pointcut handling

This fixes:
- negating annotation style if() pointcuts doesn't work
- annotation style if() pointcut not able to use a binding
  that is not exposed

Fixes #120,#122

2 years agopolish - typo
Andy Clement [Mon, 31 Jan 2022 23:43:47 +0000 (15:43 -0800)]
polish - typo

2 years agoTry to improve error reporting when Asm access issues
Andy Clement [Mon, 31 Jan 2022 23:42:44 +0000 (15:42 -0800)]
Try to improve error reporting when Asm access issues

2 years agoprotect against NPE for inheritance and annotation style
Andy Clement [Fri, 21 Jan 2022 00:27:40 +0000 (16:27 -0800)]
protect against NPE for inheritance and annotation style

2 years agoMerge pull request #116 from kriegaex/release-198
Andy Clement [Tue, 18 Jan 2022 05:46:02 +0000 (21:46 -0800)]
Merge pull request #116 from kriegaex/release-198

Add more info to 1.9.8 release notes

2 years agoAdd more content to README-198.html 116/head
Alexander Kriegisch [Tue, 18 Jan 2022 03:00:41 +0000 (10:00 +0700)]
Add more content to README-198.html

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoRestructure README-198.html a bit
Alexander Kriegisch [Tue, 18 Jan 2022 02:10:40 +0000 (09:10 +0700)]
Restructure README-198.html a bit

Move usage hints about compiler preview features and LTw on JDK 16+
towards the end.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoFix annotation style support for if(true) and if(false)
Andy Clement [Tue, 18 Jan 2022 01:47:37 +0000 (17:47 -0800)]
Fix annotation style support for if(true) and if(false)

The documentation specifies annotation style pointcuts
can use if(false) or if(true) and not require a boolean
return value and body for the @Pointcut annotated
method but it doesn't work without this change to validation
that recognizes the situation.

Fixes #115

2 years agoUpdate 'taskdefs' code to use generics 114/head
Andrey Turbanov [Fri, 14 Jan 2022 20:34:14 +0000 (23:34 +0300)]
Update 'taskdefs' code to use generics

2 years agoMerge pull request #113 from turbanoff/use_generic_in_weaver_module
Andy Clement [Fri, 14 Jan 2022 20:11:08 +0000 (12:11 -0800)]
Merge pull request #113 from turbanoff/use_generic_in_weaver_module

Update 'weaver' code to use generics

2 years agoUpdate 'weaver' code to use generics 113/head
Andrey Turbanov [Fri, 14 Jan 2022 19:34:54 +0000 (22:34 +0300)]
Update 'weaver' code to use generics

2 years agoCouple of basic tests for the repository optimizations
Andy Clement [Fri, 14 Jan 2022 01:57:51 +0000 (17:57 -0800)]
Couple of basic tests for the repository optimizations

2 years agoOptimize class loading - make backward compatible with legacy behaviour
Alexander Kriegisch [Fri, 7 May 2021 10:14:34 +0000 (17:14 +0700)]
Optimize class loading - make backward compatible with legacy behaviour

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>
2 years agoOptimize class loading
Stefan Starke [Tue, 8 Oct 2019 11:27:41 +0000 (13:27 +0200)]
Optimize class loading

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>
2 years agoMerge pull request #112 from turbanoff/use_genercs_in_runtime_module
Andy Clement [Mon, 10 Jan 2022 23:02:28 +0000 (15:02 -0800)]
Merge pull request #112 from turbanoff/use_genercs_in_runtime_module

Update 'runtime' code to use generics

2 years agoUpdate 'runtime' code to use generics 112/head
Andrey Turbanov [Mon, 10 Jan 2022 18:17:04 +0000 (21:17 +0300)]
Update 'runtime' code to use generics

2 years agoMerge pull request #104 from turbanoff/use_generic_instead_of_raw_types
Andy Clement [Mon, 10 Jan 2022 16:10:20 +0000 (08:10 -0800)]
Merge pull request #104 from turbanoff/use_generic_instead_of_raw_types

Update org.aspectj.matcher code to use generics.

2 years agoMerge pull request #109 from turbanoff/avoid_empty_arrays_allocation
Andy Clement [Mon, 10 Jan 2022 16:09:47 +0000 (08:09 -0800)]
Merge pull request #109 from turbanoff/avoid_empty_arrays_allocation

Reduce empty array allocations

2 years agoMerge pull request #110 from turbanoff/use_StringBuilder_for_concatenation_in_loop
Andy Clement [Mon, 10 Jan 2022 16:08:32 +0000 (08:08 -0800)]
Merge pull request #110 from turbanoff/use_StringBuilder_for_concatenation_in_loop

Use StringBuilder/StringJoiner for concatenation String's in loop

2 years agoMerge pull request #111 from kriegaex/release-198
Andy Clement [Mon, 10 Jan 2022 16:06:56 +0000 (08:06 -0800)]
Merge pull request #111 from kriegaex/release-198

Add test for Java 11 constant-dynamic

2 years agoUpdate README-198.html with condy bugfix info 111/head
Alexander Kriegisch [Sun, 9 Jan 2022 02:02:22 +0000 (09:02 +0700)]
Update README-198.html with condy bugfix info

Relates to #68.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoAdd test for Java 11 constant-dynamic
Alexander Kriegisch [Sat, 8 Jan 2022 09:06:51 +0000 (16:06 +0700)]
Add test for Java 11 constant-dynamic

Relates to #68.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoFix ConstantDynamic to use the right tag.
Andy Clement [Fri, 7 Jan 2022 06:18:21 +0000 (22:18 -0800)]
Fix ConstantDynamic to use the right tag.

The class ConstantDynamic was incorrectly using the `InvokeDynamic` tag
during construction which meant after reading in code containing a
`Dynamic` reference, it would incorrectly be written out as an
`InvokeDynamic` reference. There is not much code out there using
Dynamic so wasn't uncovered before.

Fixes #68

2 years agoUse StringBuilder/StringJoiner for concatenation String's in loop 110/head
Andrey Turbanov [Sat, 18 Dec 2021 12:53:24 +0000 (15:53 +0300)]
Use StringBuilder/StringJoiner for concatenation String's in loop

2 years agoReduce empty array allocations 109/head
Andrey Turbanov [Sat, 18 Dec 2021 12:20:43 +0000 (15:20 +0300)]
Reduce empty array allocations

2 years agoMerge pull request #103 from turbanoff/redundant_boxing
Andy Clement [Tue, 14 Dec 2021 06:04:21 +0000 (22:04 -0800)]
Merge pull request #103 from turbanoff/redundant_boxing

Cleanup redundant boxing.

2 years agoMerge pull request #107 from turbanoff/more_StringBuilder_instead_of_StringBuffer
Andy Clement [Fri, 10 Dec 2021 23:55:57 +0000 (15:55 -0800)]
Merge pull request #107 from turbanoff/more_StringBuilder_instead_of_StringBuffer

Replace more usages of StringBuffer with StringBuilder

2 years agoReplace more usages of StringBuffer with StringBuilder 107/head
Andrey Turbanov [Sun, 5 Dec 2021 20:23:51 +0000 (23:23 +0300)]
Replace more usages of StringBuffer with StringBuilder

2 years agoMerge pull request #102 from turbanoff/trim_trailing_whitespaces
Andy Clement [Tue, 30 Nov 2021 15:37:07 +0000 (07:37 -0800)]
Merge pull request #102 from turbanoff/trim_trailing_whitespaces

Trim trailing whitespaces.

2 years agoMerge pull request #101 from turbanoff/use_StringBuilder_instead_of_StringBuffer
Andy Clement [Tue, 30 Nov 2021 15:35:20 +0000 (07:35 -0800)]
Merge pull request #101 from turbanoff/use_StringBuilder_instead_of_StringBuffer

Replace uses of StringBuffer with StringBuilder.

2 years agoMerge pull request #100 from turbanoff/File.exists_before_File.isDirectory_is_redundant
Andy Clement [Mon, 29 Nov 2021 23:31:59 +0000 (15:31 -0800)]
Merge pull request #100 from turbanoff/File.exists_before_File.isDirectory_is_redundant

Remove redundant File.exists() check before File.isDirectory()

2 years agoMerge pull request #106 from kriegaex/release-198
Andy Clement [Mon, 29 Nov 2021 23:30:39 +0000 (15:30 -0800)]
Merge pull request #106 from kriegaex/release-198

Release 1.9.8.RC3, fixing #105

2 years agoAdd forgotten Bugs198Tests to test suite 106/head
Alexander Kriegisch [Fri, 26 Nov 2021 09:24:44 +0000 (10:24 +0100)]
Add forgotten Bugs198Tests to test suite

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoSet version to 1.9.8-SNAPSHOT
Alexander Kriegisch [Fri, 26 Nov 2021 08:20:41 +0000 (09:20 +0100)]
Set version to 1.9.8-SNAPSHOT

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoSet version to 1.9.8.RC3 V1_9_8_RC3
Alexander Kriegisch [Fri, 26 Nov 2021 08:18:37 +0000 (09:18 +0100)]
Set version to 1.9.8.RC3

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoDocument bugfix #105 in release notes
Alexander Kriegisch [Fri, 26 Nov 2021 08:17:21 +0000 (09:17 +0100)]
Document bugfix #105 in release notes

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoMore minor 1.9.7 to 1.9.8 version bumps in docs
Alexander Kriegisch [Fri, 26 Nov 2021 07:55:53 +0000 (08:55 +0100)]
More minor 1.9.7 to 1.9.8 version bumps in docs

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoIncorporate JDT Core fix + test for #105
Alexander Kriegisch [Fri, 26 Nov 2021 06:34:01 +0000 (07:34 +0100)]
Incorporate JDT Core fix + test for #105

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
3 years agoMerge pull request #99 from kriegaex/release-198
Andy Clement [Tue, 23 Nov 2021 00:59:41 +0000 (16:59 -0800)]
Merge pull request #99 from kriegaex/release-198

IDE.md: Add Eclipse update site for AJDT compatible with 2021-09

3 years agoUpdate org.aspectj.matcher code to use generics. 104/head
Andrey Turbanov [Sat, 20 Nov 2021 19:40:35 +0000 (22:40 +0300)]
Update org.aspectj.matcher code to use generics.

Generics make code more type-safe and allows removing ugly type-casts.

3 years agoCleanup redundant boxing. 103/head
Andrey Turbanov [Sat, 20 Nov 2021 17:37:02 +0000 (20:37 +0300)]
Cleanup redundant boxing.

Methods Integer.parseInt/Boolean.parseBoolean should be preferred over Integer.valueOf/Boolean.valueOf/ if final result is primitive.
They are generally faster and generate less garbage.

3 years agoTrim trailing whitespaces. 102/head
Andrey Turbanov [Sat, 20 Nov 2021 14:31:33 +0000 (17:31 +0300)]
Trim trailing whitespaces.

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.

3 years agoReplace uses of StringBuffer with StringBuilder. 101/head
Andrey Turbanov [Sat, 20 Nov 2021 14:16:22 +0000 (17:16 +0300)]
Replace uses of StringBuffer with StringBuilder.

StringBuffer is a legacy synchronized class. StringBuilder is a direct replacement to StringBuffer which generally have better performance.

3 years agoAccording to javadoc File.isDirectory 'true' if and only if the file denoted by this... 100/head
Andrey Turbanov [Sat, 20 Nov 2021 13:53:30 +0000 (16:53 +0300)]
According to javadoc File.isDirectory 'true' if and only if the file denoted by this abstract pathname exists and is a directory.
It means that separate File.exists() check before File.isDirectory() check is redundant.

3 years agoIDE.md: Add Eclipse update site for AJDT compatible with 2021-09 99/head
Alexander Kriegisch [Sat, 20 Nov 2021 13:19:37 +0000 (14:19 +0100)]
IDE.md: Add Eclipse update site for AJDT compatible with 2021-09

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
3 years agoMinor 1.9.7 to 1.9.8 version bumps in docs and Ant script
Alexander Kriegisch [Sat, 20 Nov 2021 13:17:47 +0000 (14:17 +0100)]
Minor 1.9.7 to 1.9.8 version bumps in docs and Ant script

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
3 years agoMerge pull request #98 from kriegaex/release-198
Andy Clement [Mon, 15 Nov 2021 17:54:30 +0000 (09:54 -0800)]
Merge pull request #98 from kriegaex/release-198

Make AspectJ Ant task compatible with Java 16, 17

3 years agoMake AspectJ Ant task compatible with Java 16, 17 98/head
Alexander Kriegisch [Mon, 15 Nov 2021 11:39:25 +0000 (12:39 +0100)]
Make AspectJ Ant task compatible with Java 16, 17

Closes #97

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
3 years agoRemove redundant OSSRH snapshot repositories
Alexander Kriegisch [Mon, 11 Oct 2021 15:11:08 +0000 (17:11 +0200)]
Remove redundant OSSRH snapshot repositories

Background: When only consuming dependencies or plugins from OSSRH
snapshots, there is no need to differentiate between the classic and
new URLs. This is only relevant when deploying snapshots, i.e. in the
'distributionManagement' POM section.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
3 years agoMerge pull request #96 from kriegaex/release-198
Andy Clement [Wed, 10 Nov 2021 16:31:44 +0000 (08:31 -0800)]
Merge pull request #96 from kriegaex/release-198

Release version 1.9.8.RC2

3 years agoSet version to 1.9.8-SNAPSHOT 96/head
Alexander Kriegisch [Wed, 10 Nov 2021 11:49:44 +0000 (12:49 +0100)]
Set version to 1.9.8-SNAPSHOT

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
3 years agoSet version to 1.9.8.RC2 V1_9_8_RC2
Alexander Kriegisch [Wed, 10 Nov 2021 11:47:33 +0000 (12:47 +0100)]
Set version to 1.9.8.RC2

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
3 years agoBump JDT Core to 1.9.8.RC2
Alexander Kriegisch [Wed, 10 Nov 2021 11:31:51 +0000 (12:31 +0100)]
Bump JDT Core to 1.9.8.RC2

Fixes JDT Core bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=576093
and related AspectJ issue #95.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>