]> source.dussan.org Git - aspectj.git/log
aspectj.git
8 months agoAsciidoctor: Create HTML/PDF with TOC level 5
Alexander Kriegisch [Sat, 16 Mar 2024 09:21:34 +0000 (10:21 +0100)]
Asciidoctor: Create HTML/PDF with TOC level 5

The default is 2 in Asciidoctor. A higher TOC level enables developers
and users to post more precise deep-links into docs. In PDF versions, it
is also easier now to navigate from the TOC to a specific subchapter.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
8 months agoRemove lib/jdtcore-aj
Alexander Kriegisch [Fri, 15 Mar 2024 17:16:02 +0000 (18:16 +0100)]
Remove lib/jdtcore-aj

If any of the old Ant builds, e.g. tests/profiling/build.xml, which
have never been mavenised, need JDT Core, they should be converted to
Maven builds and refer to it as a regular dependency. As is, the Ant
builds would not run anyway, because other dependency locations have
changed as well.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
8 months agoRemove lib/jarjar
Alexander Kriegisch [Fri, 15 Mar 2024 13:12:54 +0000 (14:12 +0100)]
Remove lib/jarjar

The jarjar library seems to be unused.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
8 months agoRemove lib/regexp
Alexander Kriegisch [Fri, 15 Mar 2024 12:54:08 +0000 (13:54 +0100)]
Remove lib/regexp

The library seems to be unused.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
8 months agoRemove bcel-builder/verifier-src
Alexander Kriegisch [Fri, 15 Mar 2024 12:41:59 +0000 (13:41 +0100)]
Remove bcel-builder/verifier-src

It looks as if the source code is never built and never used either.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
8 months agoReactivate test in AtAjAnnotationGenTests
Alexander Kriegisch [Fri, 15 Mar 2024 13:00:48 +0000 (14:00 +0100)]
Reactivate test in AtAjAnnotationGenTests

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>
8 months agoRemove BCEL files from 'lib' module
Alexander Kriegisch [Fri, 15 Mar 2024 12:39:04 +0000 (13:39 +0100)]
Remove BCEL files from 'lib' module

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>
8 months agoRemove Apache Commons from 'lib' module, update remaining dependencies
Alexander Kriegisch [Fri, 15 Mar 2024 11:17:48 +0000 (12:17 +0100)]
Remove Apache Commons from 'lib' module, update remaining dependencies

Of beanutils, collections, digester and logging actually only digester
and logging are directly used in AspectJ code. Therefore, remove the
unused ones and upgrade the remaining libraries' versions to ones which
also have source JARs on Maven Central. This makes downloading sources
from GitHub and packaging separate commons.jar and commons-src.zip
artifacts superfluous. Hence, we can get rid of them completely.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
8 months agoThrow exception for minimal AJC runtime version violation
Alexander Kriegisch [Fri, 15 Mar 2024 08:20:21 +0000 (09:20 +0100)]
Throw exception for minimal AJC runtime version violation

When running AJC, throw an AbortException(MINIMAL_JRE_VERSION) instead
of just logging an error, if the minimal JRE version requirement is
violated. Otherwise, in-process compilation would not fail due to the
skipped System.exit(-1) that was used before. In-process compilation is,
for example, relevant for AspectJ Maven Plugin, but also for non-forked
executions of Plexus AspectJ via Maven Compiler.

I am not 100% sure that AbortException is the appropriate exception
type, because it was designed for an aborted compilation process and
here compilation has not even started yet, but it seems to work fine.

Relates to #269.
Fixes #292.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
8 months agoAdd links for AspectJ 1.9.21.2
Alexander Kriegisch [Wed, 13 Mar 2024 09:17:17 +0000 (10:17 +0100)]
Add links for AspectJ 1.9.21.2

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
8 months agoSet version to 1.9.22-SNAPSHOT
Alexander Kriegisch [Wed, 13 Mar 2024 08:51:34 +0000 (09:51 +0100)]
Set version to 1.9.22-SNAPSHOT

8 months agoRelease AspectJ 1.9.21.2 V1_9_21_2
Alexander Kriegisch [Wed, 13 Mar 2024 08:48:26 +0000 (09:48 +0100)]
Release AspectJ 1.9.21.2

8 months agoAdd release notes for AspectJ 1.9.21.2
Alexander Kriegisch [Wed, 13 Mar 2024 08:20:55 +0000 (09:20 +0100)]
Add release notes for AspectJ 1.9.21.2

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
8 months agoAvoid ThreadLocal memory leak in JoinPointImpl
Alexander Kriegisch [Sat, 2 Mar 2024 10:52:31 +0000 (11:52 +0100)]
Avoid ThreadLocal memory leak in JoinPointImpl

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>
8 months agoAdd regression tests for inheritable thread-local memory leak
Alexander Kriegisch [Wed, 6 Mar 2024 14:27:50 +0000 (15:27 +0100)]
Add regression tests for inheritable thread-local memory leak

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>
8 months agoAjcTestCase: Improve forked JVM parameter handling
Alexander Kriegisch [Wed, 6 Mar 2024 15:48:29 +0000 (16:48 +0100)]
AjcTestCase: Improve forked JVM parameter handling

- Recognise more "fork-worthy" JVM parameters
- Pass on program arguments to program in forked JVM

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
8 months agoImproved fix for #285
KimmingLau [Wed, 28 Feb 2024 03:50:59 +0000 (11:50 +0800)]
Improved fix for #285

1. Write SAME_BYTES to cacheMap when woven bytes are null
2. Fix TODO in SimpleCache::getAndInitialize, using Optional to help
   indicate cache hit for unwoven class
3. Improve test coverage (cache miss, cache hit for unwoven class)

Relates to #285.

Co-authored-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Signed-off-by: KimmingLau <294001791@qq.com>
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
8 months agoImprove unwoven class file handling in SimpleCache
Alexander Kriegisch [Sat, 2 Mar 2024 08:44:03 +0000 (09:44 +0100)]
Improve unwoven class file handling in SimpleCache

Also update lib/aspectj/aspectjweaver.jar to fix integration tests.

Fixes #285.

Co-authored-by: Kimming Lau <294001791@qq.com>
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
8 months agoAdd Bugs1921Tests::testGitHub_285
Alexander Kriegisch [Sat, 2 Mar 2024 08:08:48 +0000 (09:08 +0100)]
Add Bugs1921Tests::testGitHub_285

This is an additional reproducer for regression bug #285.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
8 months agoFix: AllTestsAspectJ171 runs correct NewFeatures suite
Alexander Kriegisch [Sat, 2 Mar 2024 09:01:49 +0000 (10:01 +0100)]
Fix: AllTestsAspectJ171 runs correct NewFeatures suite

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>
8 months agoBump AspectJ libraries in 'lib' subfolders to 1.9.21.1
Alexander Kriegisch [Sat, 2 Mar 2024 07:57:44 +0000 (08:57 +0100)]
Bump AspectJ libraries in 'lib' subfolders to 1.9.21.1

This reproduces regression bug #285 when running
org.aspectj.systemtest.ajc171.NewFeatures::testSharedCache.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
8 months agoFurther improve '-xmlConfigured' docs
Alexander Kriegisch [Sat, 24 Feb 2024 01:30:25 +0000 (08:30 +0700)]
Further improve '-xmlConfigured' docs

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
8 months agoAdd link to JDK-8326483 for "generated by javadoc (n)" issue
Alexander Kriegisch [Sat, 24 Feb 2024 01:06:48 +0000 (08:06 +0700)]
Add link to JDK-8326483 for "generated by javadoc (n)" issue

https://bugs.openjdk.org/browse/JDK-8326483
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
9 months agoRephrase docs for WeavingXmlConfig::excludesType
Alexander Kriegisch [Fri, 23 Feb 2024 10:43:47 +0000 (17:43 +0700)]
Rephrase docs for WeavingXmlConfig::excludesType

and turn into javadoc.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
9 months agoFix typos: '-xmlConfigured', not '-xmlConfig'
Alexander Kriegisch [Thu, 22 Feb 2024 03:42:17 +0000 (10:42 +0700)]
Fix typos: '-xmlConfigured', not '-xmlConfig'

Also reformat compiler usage page to adhere to 80-character limit again.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
9 months agoajc.adoc: Fix typo ('-xmlConfigured', not '-xmlConfig')
Alexander Kriegisch [Thu, 22 Feb 2024 03:40:59 +0000 (10:40 +0700)]
ajc.adoc: Fix typo ('-xmlConfigured', not '-xmlConfig')

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
9 months agoajc.adoc: Cosmetic improvements
Alexander Kriegisch [Thu, 22 Feb 2024 03:24:56 +0000 (10:24 +0700)]
ajc.adoc: Cosmetic improvements

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
9 months agoajc.adoc: Update '-source', '-target', '-<version>'
Alexander Kriegisch [Thu, 22 Feb 2024 03:24:39 +0000 (10:24 +0700)]
ajc.adoc: Update '-source', '-target', '-<version>'

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
9 months agoDocument AJC option '-xmlConfigured'
Alexander Kriegisch [Thu, 22 Feb 2024 03:20:45 +0000 (10:20 +0700)]
Document AJC option '-xmlConfigured'

- Add short description to AJC usage message via
  messages_aspectj.properties
- Add longer description to ajc.adoc in the AspectJ Development
  Environment Guide

Closes https://bugs.eclipse.org/bugs/show_bug.cgi?id=455014.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
9 months agoAdd Ajc164Tests::testMultipleXMLFiles
Alexander Kriegisch [Wed, 21 Feb 2024 03:35:44 +0000 (10:35 +0700)]
Add Ajc164Tests::testMultipleXMLFiles

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>
9 months agoExtend documentation for Antrun execution to fix javadocs
Alexander Kriegisch [Wed, 21 Feb 2024 02:16:19 +0000 (09:16 +0700)]
Extend documentation for Antrun execution to fix javadocs

Also update the internal review ID of the OpenJDK bug I created, because
previously I had created a feature request, which has remained
unanswered. But actually, I think it is rather a regression bug, having
found out that before JDK 16 the behaviour was exactly how the feature
request describes it.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
9 months agoNew abstract class JavaVersionSpecificXMLBasedAjcTestCase
Alexander Kriegisch [Mon, 19 Feb 2024 15:01:05 +0000 (22:01 +0700)]
New abstract class JavaVersionSpecificXMLBasedAjcTestCase

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>
9 months agoReformat and slightly refactor AjcTaskTest
Alexander Kriegisch [Mon, 19 Feb 2024 08:59:16 +0000 (15:59 +0700)]
Reformat and slightly refactor AjcTaskTest

I was looking at this test for another reason and thought, it might be a
good idea to make it a little bit more compact and re-indent it.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
9 months agoAjcTask: make version number arrays more generic
Alexander Kriegisch [Mon, 19 Feb 2024 07:03:31 +0000 (14:03 +0700)]
AjcTask: make version number arrays more generic

SOURCE_INPUTS, TARGET_INPUTS, COMPLIANCE_INPUTS are now populated in a
'for' loop in a static initialiser block. I.e., adding support for a new
Java version is now as simple as incrementing field JAVA_VERSION_MAX. In
case ECJ raises the minimum supporter compiler source/target version,
field JAVA_VERSION_MIN needs to be incremented. But that should happen
less frequently.

This was done to make the 'AspectJ_JDK_Update' tasks as easy and as
little error-prone as possible.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
9 months agoRemove most MINOR_*, MINOR_* BCEL class file versions
Alexander Kriegisch [Mon, 19 Feb 2024 06:19:49 +0000 (13:19 +0700)]
Remove most MINOR_*, MINOR_* BCEL class file versions

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>
9 months agoLangUtil: remove methods like 'is11VMOrGreater', 'is1dot5VMOrGreater'
Alexander Kriegisch [Mon, 19 Feb 2024 03:22:10 +0000 (10:22 +0700)]
LangUtil: remove methods like 'is11VMOrGreater', 'is1dot5VMOrGreater'

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>
9 months agoAdd 'AspectJ_JDK_Update' hint in various places
Alexander Kriegisch [Mon, 19 Feb 2024 02:41:18 +0000 (09:41 +0700)]
Add 'AspectJ_JDK_Update' hint in various places

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>
9 months agoSuppress Maven download messages in CI build
Alexander Kriegisch [Mon, 19 Feb 2024 01:06:04 +0000 (08:06 +0700)]
Suppress Maven download messages in CI build

by SLF4J system property, see
https://blogs.itemis.com/en/in-a-nutshell-removing-artifact-messages-from-maven-log-output

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
9 months agoRephrase "check the diffs before committing" section
Alexander Kriegisch [Sat, 17 Feb 2024 05:50:55 +0000 (12:50 +0700)]
Rephrase "check the diffs before committing" section

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
9 months agoRun Antrun post-javadoc task depending on Javadoc execution
Alexander Kriegisch [Sat, 17 Feb 2024 04:55:26 +0000 (11:55 +0700)]
Run Antrun post-javadoc task depending on Javadoc execution

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
9 months agoUpdate RELEASE.md
Alexander Kriegisch [Sat, 17 Feb 2024 04:41:00 +0000 (11:41 +0700)]
Update RELEASE.md

- Remove obsolete section "Deploying the AspectJ installer to
  aspectj.dev", because we are publishing releases on GitHub, attaching
  installers to them.

- Add section "Publish documentation on website".

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
9 months agoMinor POM cosmetics
Alexander Kriegisch [Sat, 17 Feb 2024 04:38:17 +0000 (11:38 +0700)]
Minor POM cosmetics

One less warning in IntelliJ due to the entirely optional groupId for
that plugin, but IntelliJ still complains.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
9 months agoUse Antrun plugin to eliminate javadoc version number in HTML
Alexander Kriegisch [Sat, 17 Feb 2024 04:37:08 +0000 (11:37 +0700)]
Use Antrun plugin to eliminate javadoc version number in HTML

This is the one issue that cannot be solved regarding reproducible
builds by setting javadoc options, because that header comment is
hard-coded into the JDK with no option to avoid it. I just created an
OpenJDK issue (internal review ID 9076583, not published yet) for it,
but that does not help us today.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
9 months agoMaven Javadoc: Add options for reproducible build artifacts
Alexander Kriegisch [Sat, 17 Feb 2024 04:33:23 +0000 (11:33 +0700)]
Maven Javadoc: Add options for reproducible build artifacts

and smaller diffs when committing changes to the website,avoiding
timestamps, changing current copyright years, artifact versions.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
9 months agoBump Maven Javadoc to 3.6.3
Alexander Kriegisch [Sat, 17 Feb 2024 04:28:24 +0000 (11:28 +0700)]
Bump Maven Javadoc to 3.6.3

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
9 months agoSuppress "unresolved Maven property" warning in IntelliJ for 'maven.gpg
Alexander Kriegisch [Sat, 17 Feb 2024 04:26:08 +0000 (11:26 +0700)]
Suppress "unresolved Maven property" warning in IntelliJ for 'maven.gpg
.skip'

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
9 months agoReproducible builds: set project.build.outputTimestamp
Alexander Kriegisch [Sat, 17 Feb 2024 04:24:26 +0000 (11:24 +0700)]
Reproducible builds: set project.build.outputTimestamp

See https://maven.apache.org/guides/mini/guide-reproducible-builds.html.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
9 months agoRemove obsolete stuff from module 'build' and lib/build
Alexander Kriegisch [Fri, 16 Feb 2024 04:08:32 +0000 (11:08 +0700)]
Remove obsolete stuff from module 'build' and lib/build

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
9 months agoAdd decade 2020-2029 to copyright years in Checklics
Alexander Kriegisch [Fri, 16 Feb 2024 03:58:20 +0000 (10:58 +0700)]
Add decade 2020-2029 to copyright years in Checklics

FWIW, I just wanted to know if the tests in module 'build' would still
pass. They did not find copyrights for more recent years, so I added
them here.

But I am still unsure, if we need these tests at all. Obviously, they
were not running during CI builds, i.e. they seem to be non-essential.
But chances are, they were forgotten to be added to the suite.

BTW, running the tests in module 'build' with '-Drun.build.tests=true'
is failing, too, because some old JDK classes looked up there no longer
exist in more recent JDKs.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
9 months agoAvoid "Last updated [timestamp]" footer on each docs page
Alexander Kriegisch [Thu, 15 Feb 2024 12:34:26 +0000 (19:34 +0700)]
Avoid "Last updated [timestamp]" footer on each docs page

Set Asciidoctor option 'nofooter' to avoid the annoying timestamps. It
makes updating the website difficult, because always there are "changes"
in each file. Diffing real changes in generated files for the website
before committing becomes difficult. Furthermore, the user does not have
any immediate benefit for most documents, as they change infrequently or
never (e.g. old release notes).

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
9 months agoMention release 1.9.21.1 in overview pages
Alexander Kriegisch [Thu, 15 Feb 2024 11:43:02 +0000 (18:43 +0700)]
Mention release 1.9.21.1 in overview pages

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
9 months agoAdd missing release notes for 1.8.12, 1.8.13, 1.8.14
Alexander Kriegisch [Thu, 15 Feb 2024 11:38:48 +0000 (18:38 +0700)]
Add missing release notes for 1.8.12, 1.8.13, 1.8.14

I found those in HTML only on the Eclipse web server, but not in the Git
repository. So, I manually converted them to ADOC.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
9 months agoAdd Git .mailmap file
Alexander Kriegisch [Thu, 15 Feb 2024 06:42:36 +0000 (13:42 +0700)]
Add Git .mailmap file

Mapping file for Git committers, mapping e-mail addresses to names for
'git shortlog -sne'. See https://git-scm.com/docs/gitmailmap.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
9 months agoGlobally replace "http:" by "https:" in non-XML files
Alexander Kriegisch [Thu, 15 Feb 2024 02:36:18 +0000 (09:36 +0700)]
Globally replace "http:" by "https:" in non-XML files

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>
9 months agoRemove noise from aspectj_1_5_0.dtd
Alexander Kriegisch [Thu, 15 Feb 2024 02:21:45 +0000 (09:21 +0700)]
Remove noise from aspectj_1_5_0.dtd

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
9 months agojoinpointsignatures.adoc: minor formatting cosmetics
Alexander Kriegisch [Thu, 15 Feb 2024 02:00:06 +0000 (09:00 +0700)]
joinpointsignatures.adoc: minor formatting cosmetics

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
9 months agoReplace links to https://www.eclipse.org/aspectj/doc/next
Alexander Kriegisch [Thu, 15 Feb 2024 01:59:28 +0000 (08:59 +0700)]
Replace links to https://www.eclipse.org/aspectj/doc/next

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>
9 months agoFix some docs links
Alexander Kriegisch [Wed, 14 Feb 2024 04:27:59 +0000 (11:27 +0700)]
Fix some docs links

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
9 months agoSet version to 1.9.22-SNAPSHOT
Alexander Kriegisch [Wed, 14 Feb 2024 02:27:32 +0000 (09:27 +0700)]
Set version to 1.9.22-SNAPSHOT

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
9 months agoRelease 1.9.21.1 V1_9_21_1
Alexander Kriegisch [Wed, 14 Feb 2024 02:24:11 +0000 (09:24 +0700)]
Release 1.9.21.1

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
9 months agoRelease notes for 1.9.21.1
Alexander Kriegisch [Wed, 14 Feb 2024 02:07:09 +0000 (09:07 +0700)]
Release notes for 1.9.21.1

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
9 months agoBump JDT Core to 1.9.21.1
Alexander Kriegisch [Tue, 13 Feb 2024 10:44:14 +0000 (17:44 +0700)]
Bump JDT Core to 1.9.21.1

Eclipse Compiler 8398f6c1210ec3 (13Feb2024) - Java21

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
9 months agoAdd tests for underscores in pointcuts on Java 21+
Alexander Kriegisch [Tue, 13 Feb 2024 10:05:04 +0000 (17:05 +0700)]
Add tests for underscores in pointcuts on Java 21+

See also:
https://github.com/eclipse-aspectj/eclipse.jdt.core/commit/5d2f2aecd2

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
9 months agoITD inner type tests: replace '_' by '__'
Alexander Kriegisch [Mon, 12 Feb 2024 08:19:33 +0000 (15:19 +0700)]
ITD inner type tests: replace '_' by '__'

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>
9 months agoAjCompilerOptions: Increment irritant levels to GROUP4
Alexander Kriegisch [Mon, 12 Feb 2024 07:34:44 +0000 (14:34 +0700)]
AjCompilerOptions: Increment irritant levels to GROUP4

Needs eclipse-aspectj/eclipse.jdt.core#ed6050bb.

See also eclipse-jdt/eclipse.jdt.core#2006.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
9 months agoAdjust AjASTConverter to JDT Core StringLiteralConcatenation changes
Alexander Kriegisch [Mon, 12 Feb 2024 06:19:13 +0000 (13:19 +0700)]
Adjust AjASTConverter to JDT Core StringLiteralConcatenation changes

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
9 months agoUpdate Java 21 string patterns tests after JDT Core bugfix
Alexander Kriegisch [Mon, 12 Feb 2024 05:57:27 +0000 (12:57 +0700)]
Update Java 21 string patterns tests after JDT Core bugfix

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>
9 months agoajc1921.xml: Add AspectJ version hint to #279 test case
Alexander Kriegisch [Fri, 9 Feb 2024 05:55:27 +0000 (12:55 +0700)]
ajc1921.xml: Add AspectJ version hint to #279 test case

"same class woven concurrently in parallel-capable classloader".

Relates to #279.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
9 months agoAdd implementation note and JDK-8325536 link to Aj.preProcess
Alexander Kriegisch [Fri, 9 Feb 2024 05:53:13 +0000 (12:53 +0700)]
Add implementation note and JDK-8325536 link to Aj.preProcess

See https://bugs.openjdk.org/browse/JDK-8325536.

Relates to #277.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
9 months agoFactor out some anonymous IWeaveRequestor classes to inner classes
Alexander Kriegisch [Thu, 8 Feb 2024 04:58:49 +0000 (11:58 +0700)]
Factor out some anonymous IWeaveRequestor classes to inner classes

Drive-by cosmetics in the context of #279.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
9 months agoStore only weaved class names in the generatedClasses map
Uri Simchoni [Mon, 5 Feb 2024 06:34:35 +0000 (08:34 +0200)]
Store only weaved class names in the generatedClasses map

The generatedClasses map contained both keys of woven classes that had
generated classes associated with them, and the keys of the generated
classes themselves. It seems like this map is never consulted for the
generated class key - the generated class is generated from within the
context of woven class loading / retransformation, and thus no transform
event is generated for it by the JVM. Because of that, we do not need to
guard against re-weaving it. Other uses of generatedClasses map are for
full/empty tests, where the woven class key is sufficient. This change
simplifies deletion of a class because we do not have to look for its
associated generated classes.

Relates to #279.

9 months agoRemove WeavingAdaptor.couldWeave()
Uri Simchoni [Mon, 5 Feb 2024 06:29:32 +0000 (08:29 +0200)]
Remove WeavingAdaptor.couldWeave()

WeavingAdaptor.couldWeave() tested two things: whether this specific
class (by its name) should be excluded from weaving, and whether the
class has generated classes associated with it (in which case we avoid
weaving to avoid re-creating those generated classes). However, if the
class has generated classes associated, couldWeave() is not called at
all because of the new wovenWithGeneratedClass() test, so we have
only the name test which is now called directly.

Relates to #279.

9 months agoUse previous weaving result if classes were generated during weaving
Uri Simchoni [Sun, 4 Feb 2024 10:51:15 +0000 (12:51 +0200)]
Use previous weaving result if classes were generated during weaving

A parallel-capable class loader might load the same class multiple times
in multiple threads, see
https://docs.oracle.com/javase/7/docs/technotes/guides/lang/cl-mt.html.

In this scenario, the JVM instrumentation mechanism invokes the AspectJ
weaver twice on the same class. In simple weaving scenarios, this would
just cause weaving logic to run multiple times and produce the same
result for each thread, but if the weaver is generating new classes,
it is undesirable to generate those classes multiple times.

To avoid this, the generatedClasses map in WeavingAdaptor keeps track of
classes for which inner classes were generated and avoids re-weaving
them. However, before this change, if a class was found in the generated
map, the weaver would return the un-woven bytes, which would cause
AspectJ not to work for some of the threads.

This change returns the woven bytes instead of re-running weaving.

Fixes #279.

9 months agoChange value of woven class in generatedClasses map
Uri Simchoni [Sun, 4 Feb 2024 10:46:03 +0000 (12:46 +0200)]
Change value of woven class in generatedClasses map

Store the woven class and not a generated (inner) class as value of the
woven class name. This has no effect in this commit, because the value
is not consulted at all, but will be used later on.

Relates to #279.

9 months agoIT reproducing GitHub issue 279
Alexander Kriegisch [Thu, 8 Feb 2024 04:25:32 +0000 (11:25 +0700)]
IT reproducing GitHub issue 279

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>
9 months agoReplace old by new AspectJ GitHub URL
Alexander Kriegisch [Thu, 8 Feb 2024 02:40:51 +0000 (09:40 +0700)]
Replace old by new AspectJ GitHub URL

github.com/eclipse/org.aspectj -> github.com/eclipse-aspectj/aspectj

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
9 months agoAdd javadoc links to ClassFileTransformer::transform
Alexander Kriegisch [Wed, 7 Feb 2024 05:06:30 +0000 (12:06 +0700)]
Add javadoc links to ClassFileTransformer::transform

Relates to #277.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
9 months agoWeaver returns null instead of original bytes for unwoven classes
Alexander Kriegisch [Wed, 7 Feb 2024 02:35:55 +0000 (09:35 +0700)]
Weaver returns null instead of original bytes for unwoven classes

This change makes sense independently of #277, but also enables using

  - cp "my.jar;aspectjweaver.jar"
  -XX:+AllowArchivingWithJavaAgent
  -javaagent:aspectjweaver.jar

while creating a CDS archive. Afterward, the application can be run in
its woven state from the CDS archive even without '-javaagent', because
the byte code was archived in its woven state ("poor man's AJC"). See
https://github.com/eclipse-aspectj/aspectj/issues/277#issuecomment-1931142753
for details.

Fixes #277.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
9 months agoBulk update GitHub actions
Alexander Kriegisch [Wed, 7 Feb 2024 03:49:34 +0000 (10:49 +0700)]
Bulk update GitHub actions

coactions/setup-xvfb no longer seems to be necessary, because XVFB is
now pre-installed on Linux.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
9 months agoWorkaround for non-English javadoc generation
Alexander Kriegisch [Thu, 1 Feb 2024 10:16:42 +0000 (17:16 +0700)]
Workaround for non-English javadoc generation

On my workstation, more recent JDKs generate partly German javadocs.

Background: Avoid non-English javadoc generation. Due to
https://bugs.openjdk.org/browse/JDK-8222793 reoccurring at least in JDKs
19-21 and also being broken in some older JDKs, we cannot rely on just
setting the locale parameter, but also need the 'user.language' and
'user.country' parameters in 'additionalJOptions' as a workaround.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
9 months agoDRY: Centralise common Maven Javadoc configuration
Alexander Kriegisch [Thu, 1 Feb 2024 10:13:22 +0000 (17:13 +0700)]
DRY: Centralise common Maven Javadoc configuration

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
9 months agoFix some javadoc links in ADOCs
Alexander Kriegisch [Thu, 1 Feb 2024 10:11:38 +0000 (17:11 +0700)]
Fix some javadoc links in ADOCs

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
9 months agoUnpack asm-commons during javadoc generation
Alexander Kriegisch [Thu, 1 Feb 2024 10:11:05 +0000 (17:11 +0700)]
Unpack asm-commons during javadoc generation

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
9 months agoAlways use ":leveloffset: +1" with ":doctype: book"
Alexander Kriegisch [Thu, 1 Feb 2024 04:57:10 +0000 (11:57 +0700)]
Always use ":leveloffset: +1" with ":doctype: book"

Headlines per ADOC file should start at level 1, not 2. Adjusting the
level offset for books helps to avoid warnings when including book
chapters, but still allows to also use the chapters as stand-alone
documents.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
9 months agoRemove some old files relating to AspectJ Debugger ajdb
Alexander Kriegisch [Tue, 30 Jan 2024 07:29:59 +0000 (14:29 +0700)]
Remove some old files relating to AspectJ Debugger ajdb

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>
9 months agoUpdate InstallContext.onWindowsPro for Windows 11+
Alexander Kriegisch [Mon, 29 Jan 2024 10:41:30 +0000 (17:41 +0700)]
Update InstallContext.onWindowsPro for Windows 11+

The matcher is more future-proof now, as long as Windows names stay
"Windows Server.*" and "Windows [1-8][0-9]?".

This is not beautiful, but a quick drive-by improvement.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
9 months agoBump asciidoctor-maven-plugin to 2.2.5
Alexander Kriegisch [Mon, 29 Jan 2024 02:29:27 +0000 (09:29 +0700)]
Bump asciidoctor-maven-plugin to 2.2.5

getting rid of JRuby dependency workaround for
https://github.com/asciidoctor/asciidoctor-maven-plugin/issues/553

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
9 months agoRemove unnecessary agent manifest entries from aspectjmatcher POM
Alexander Kriegisch [Mon, 29 Jan 2024 02:28:09 +0000 (09:28 +0700)]
Remove unnecessary agent manifest entries from aspectjmatcher POM

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
9 months agoWorkaround for defining classes during LTW
Alexander Kriegisch [Sun, 28 Jan 2024 09:13:22 +0000 (16:13 +0700)]
Workaround for defining classes during LTW

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>
10 months agoUpdate AJDT update site URLs after project termination
Alexander Kriegisch [Sun, 21 Jan 2024 01:52:56 +0000 (08:52 +0700)]
Update AJDT update site URLs after project termination

AJDT is now part of the AspectJ project. Hence, both repository and
download area have moved to other URLs. See also:
https://gitlab.eclipse.org/eclipsefdn/emo-team/emo/-/issues/475#note_1612124

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
10 months agoFix typo in BUILD.md
Alexander Kriegisch [Sun, 7 Jan 2024 04:29:17 +0000 (11:29 +0700)]
Fix typo in BUILD.md

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
10 months agoAttach installer to CI build
Alexander Kriegisch [Sun, 7 Jan 2024 04:26:26 +0000 (11:26 +0700)]
Attach installer to CI build

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
10 months agoDelete obsolete files
Alexander Kriegisch [Sun, 7 Jan 2024 04:19:13 +0000 (11:19 +0700)]
Delete obsolete files

- Redundant copies of HTML files used in AspectJ installer, which
  already exist as resource files in module 'build'
- Null-sized AspectJ library JARs which probably were used to trigger
  certain build steps in the former Ant build
- BridgeVersion.java.txt, which has been replaced by a regular
  org.aspectj.bridge.Version class which can dynamically determine
  versions from a properties file instead of relying on them being
  hard-coded into the template.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
10 months agoUpdate assemblies to include AspectJ licence
Alexander Kriegisch [Sat, 6 Jan 2024 09:48:24 +0000 (16:48 +0700)]
Update assemblies to include AspectJ licence

The former HTML file was moved up one directory level and converted to
asciidoc format. Therefore, include the ADOC file from the correct
location now.

Alternatively, we could have included the generated HTML from the
aj-build/dist/docs/doc directory, but that would have meant adding a
dependency to the 'docs' module to several other modules for this one
file. Actually, asciidoc has become a widely used and accepted format
for documentation and is human-readable by design. Therefore, it is OK
to include the ADOC file. The important thing is that the licence
information
  - is contained in each published artifact,
  - can be found easily,
  - its content is human-readable.

All these requirements are still met with this change. Arguably, ADOC is
easier to read than HTML and does not even need a web browser.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
10 months agoFix docs links to example source code
Alexander Kriegisch [Sat, 6 Jan 2024 09:04:01 +0000 (16:04 +0700)]
Fix docs links to example source code

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
10 months agoCI build: fix "create docs" step
Alexander Kriegisch [Sat, 6 Jan 2024 08:49:29 +0000 (15:49 +0700)]
CI build: fix "create docs" step

Like the javadocs in aspectjrt and aspectjweaver (if the releas profile
is active), for docs also copy the docs in the package phase to the
aj-dist directory.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
10 months agoReplace HTML content of readme-lib-module.adoc by asciidoc
Alexander Kriegisch [Sat, 6 Jan 2024 06:37:18 +0000 (13:37 +0700)]
Replace HTML content of readme-lib-module.adoc by asciidoc

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
10 months agoRename readme-lib-module.html to .adoc
Alexander Kriegisch [Sat, 6 Jan 2024 06:29:05 +0000 (13:29 +0700)]
Rename readme-lib-module.html to .adoc

In the next step, the content, which is still HTML at this point, is
going to be converted.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
10 months agoRemove obsolete DocBook build config in favour of Asciidoctor
Alexander Kriegisch [Sat, 6 Jan 2024 06:19:49 +0000 (13:19 +0700)]
Remove obsolete DocBook build config in favour of Asciidoctor

Along with the Ant and Maven build configs, downloads of
 - DocBook DTD,
 - DocBook XSL,
 - FOP,
 - Batik,
 - Saxon
also become obsolete.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
10 months agoAdd local Maven site to 'distributionManagement'
Alexander Kriegisch [Sat, 6 Jan 2024 05:56:27 +0000 (12:56 +0700)]
Add local Maven site to 'distributionManagement'

If we ever decide to add Maven site docs to the AspectJ website, now we
can deploy them locally using 'mvn site:deploy' and publish them on a
web server or even incorporate them into the binary distribution in the
installer's belly.

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