]> source.dussan.org Git - aspectj.git/log
aspectj.git
23 months agoUpdate release notes for 1.9.19 (Java 19)
Alexander Kriegisch [Wed, 21 Dec 2022 14:00:22 +0000 (15:00 +0100)]
Update release notes for 1.9.19 (Java 19)

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
23 months agoFix #366085 concerning declared annotations with source retention
Alexander Kriegisch [Sun, 4 Dec 2022 15:16:37 +0000 (16:16 +0100)]
Fix #366085 concerning declared annotations with source retention

See https://bugs.eclipse.org/bugs/show_bug.cgi?id=366085.
See https://stackoverflow.com/q/74618269/1082681.

The issue described in the Bugzilla issue is about 'declare @type', but
similar issues also existed for 'declare @field', 'declare @method',
'declare @constructor'. This fix is rather superficial and leaves
things to be desired, because it is rather hacky and simply ignores
errors source retention annotation declarations during weaving. A better
fix would drop the corresponding declarations while parsing and also
issue compiler warnings in each case.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
23 months agoMerge pull request #187 from eclipse/java-19
Alexander Kriegisch [Wed, 21 Dec 2022 12:40:20 +0000 (19:40 +0700)]
Merge pull request #187 from eclipse/java-19

Java 19 support

23 months agoAdd release notes for 1.9.19 (Java 19) 187/head
Alexander Kriegisch [Wed, 21 Dec 2022 12:00:37 +0000 (13:00 +0100)]
Add release notes for 1.9.19 (Java 19)

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
23 months agoAdd tests for Java 19 record patterns
Alexander Kriegisch [Wed, 21 Dec 2022 11:57:44 +0000 (12:57 +0100)]
Add tests for Java 19 record patterns

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
23 months agoBump ECJ version in messages_aspectj.properties
Alexander Kriegisch [Tue, 20 Dec 2022 12:06:56 +0000 (13:06 +0100)]
Bump ECJ version in messages_aspectj.properties

Eclipse Compiler 19f448f47c9e3e (15Dec2022) - Java19

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoMerge branch 'master' into java-19
Alexander Kriegisch [Sun, 13 Nov 2022 10:59:19 +0000 (11:59 +0100)]
Merge branch 'master' into java-19

2 years agoAddress upstream BCEL vulnerability CVE-2022-42920
Alexander Kriegisch [Sun, 13 Nov 2022 10:28:22 +0000 (11:28 +0100)]
Address upstream BCEL vulnerability CVE-2022-42920

Fixes #192.

See https://github.com/advisories/GHSA-97xg-phpr-rg8q.
See https://issues.apache.org/jira/browse/BCEL-363.
See https://github.com/apache/commons-bcel/pull/147.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoOutputSpec.matchesThisVm better supports version ranges
Alexander Kriegisch [Wed, 5 Oct 2022 15:37:21 +0000 (17:37 +0200)]
OutputSpec.matchesThisVm better supports version ranges

vmVersionRanges might be a single version like "9", a list of versions
like "1.2,1.3,1.4,1.5", an equivalent range of "1.2-1.5", an open range
like "-1.8", "9-" (equivalent to "9+") or a more complex list of ranges
like "-1.6,9-11,13-14,17-" or "8,11,16+".

Empty ranges like in "", " ",  "8,,14", ",5", "6-," will be ignored.
I.e., they will not yield a positive match.

Bogus ranges like "9-11-14" will be ignored, too.

Existing XML test specs using '<line text="..." vm="v,v2,...,vn"/>
have been adjusted to use version ranges rather than long lists of
consecutive versions. Furthermore, ranges with a trailing '+' like '14+'
were replaced by using the new canonical format '14-', even though the
parser still correctly recognises '14+'.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoLangUtil: improve Java version major/minor parsing
Alexander Kriegisch [Wed, 5 Oct 2022 08:11:54 +0000 (10:11 +0200)]
LangUtil: improve Java version major/minor parsing

- Ignore everything including and after '+' in versions like '19+36-2238'
- Add minor '.0' to Java versions like '19', '19+36-2238'

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoFix tests due to changed JDK 'toString' methods in Java 19
Alexander Kriegisch [Mon, 3 Oct 2022 19:51:31 +0000 (21:51 +0200)]
Fix tests due to changed JDK 'toString' methods in Java 19

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoAdd the first few Java 19 tests
Alexander Kriegisch [Mon, 3 Oct 2022 15:17:50 +0000 (17:17 +0200)]
Add the first few Java 19 tests

For now, only the "pattern matching for switch" tests from previews 1
and 2 were adjusted to work in preview 3, because guarded patterns were
replaced by 'when' clauses in 'switch' blocks. Therefore, existing test
classes did not compile anymore and had to be replaced by syntactically
upgraded versions with content merged from preview 1 and 2 classes.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoDeactivate Java 18 preview language feature tests
Alexander Kriegisch [Mon, 3 Oct 2022 14:36:33 +0000 (16:36 +0200)]
Deactivate Java 18 preview language feature tests

and enable LangUtil to parse Java versions like '19+36-2238'.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoRemove Batik path entries from test classpath
Alexander Kriegisch [Mon, 3 Oct 2022 12:02:32 +0000 (14:02 +0200)]
Remove Batik path entries from test classpath

Firstly, Batik is not needed for running AspectJ tests.

Secondly, the fixed Windows path separators led to GitHub CI/CD tests
failing under Java 18+ on GitHub. Replacing ';' by 'File.pathSeparator'
would have fixed the problem, but removing the paths altogether is the
cleaner solution.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoCosmetic fixes in Java 18 tests (e.g. copyright year 2022)
Alexander Kriegisch [Mon, 3 Oct 2022 10:55:38 +0000 (12:55 +0200)]
Cosmetic fixes in Java 18 tests (e.g. copyright year 2022)

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoDo not run Java 18 preview feature tests with Java 19 JDT Core
Alexander Kriegisch [Mon, 3 Oct 2022 10:53:33 +0000 (12:53 +0200)]
Do not run Java 18 preview feature tests with Java 19 JDT Core

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoBump ASM to 9.4, supporting Java 20 class files
Alexander Kriegisch [Sun, 2 Oct 2022 15:38:27 +0000 (17:38 +0200)]
Bump ASM to 9.4, supporting Java 20 class files

Even though we just upgraded to 9.3 for Java 19, it does not hurt to
have ASM recognise the Java 20 class file major version.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoSet Maven version to 1.9.19-SNAPSHOT
Alexander Kriegisch [Sun, 2 Oct 2022 10:36:17 +0000 (12:36 +0200)]
Set Maven version to 1.9.19-SNAPSHOT

It makes sense to indicate the Java version in the minor-minor of
AspectJ artifacts.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoSet Java 19 compiler version after JDT Core merge
Alexander Kriegisch [Sun, 2 Oct 2022 10:11:43 +0000 (12:11 +0200)]
Set Java 19 compiler version after JDT Core merge

In messages_aspectj.properties, set compiler.version to
"Eclipse Compiler 5fd28398cc7aba (21Sep2022) - Java19".

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoFirst Java 19 version, barely tested.
Alexander Kriegisch [Sat, 1 Oct 2022 15:51:45 +0000 (17:51 +0200)]
First Java 19 version, barely tested.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoAdd docs/dist/LICENSE-AspectJ.html to all public artifacts
Alexander Kriegisch [Sat, 1 Oct 2022 07:49:19 +0000 (09:49 +0200)]
Add docs/dist/LICENSE-AspectJ.html to all public artifacts

The license file will be included right in the main directory of both
binary and source artifacts for
  - AspectJ Matcher,
  - AspectJ Runtime,
  - AspectJ Weaver,
  - AspectJ Tools (Compiler),
  - AspectJ Installer.

Fixes #185.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agovuln-fix: Partial Path Traversal Vulnerability
Jonathan Leitschuh [Fri, 9 Sep 2022 03:00:08 +0000 (03:00 +0000)]
vuln-fix: Partial Path Traversal Vulnerability

This fixes a partial path traversal vulnerability.

Replaces `dir.getCanonicalPath().startsWith(parent.getCanonicalPath())`, which is vulnerable to partial path traversal attacks, with the more secure `dir.getCanonicalFile().toPath().startsWith(parent.getCanonicalFile().toPath())`.

To demonstrate this vulnerability, consider `"/usr/outnot".startsWith("/usr/out")`.
The check is bypassed although `/outnot` is not under the `/out` directory.
It's important to understand that the terminating slash may be removed when using various `String` representations of the `File` object.
For example, on Linux, `println(new File("/var"))` will print `/var`, but `println(new File("/var", "/")` will print `/var/`;
however, `println(new File("/var", "/").getCanonicalPath())` will print `/var`.

Weakness: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Severity: Medium
CVSSS: 6.1
Detection: CodeQL & OpenRewrite (https://public.moderne.io/recipes/org.openrewrite.java.security.PartialPathTraversalVulnerability)

Reported-by: Jonathan Leitschuh <Jonathan.Leitschuh@gmail.com>
Signed-off-by: Jonathan Leitschuh <Jonathan.Leitschuh@gmail.com>
Bug-tracker: https://github.com/JLLeitschuh/security-research/issues/13

Co-authored-by: Moderne <team@moderne.io>
2 years agoImprove condy (constant dynamic) support
Alexander Kriegisch [Sat, 13 Aug 2022 20:46:45 +0000 (22:46 +0200)]
Improve condy (constant dynamic) support

Relates to #170. Fixes the "Unknown constant type 17" problem.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoCI build: upgrade from Java 18-EA to 18
Alexander Kriegisch [Sun, 3 Jul 2022 08:39:24 +0000 (10:39 +0200)]
CI build: upgrade from Java 18-EA to 18

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoUse System.lineSeparator() instead of hand-crafted method
Andrey Turbanov [Wed, 20 Apr 2022 20:20:22 +0000 (23:20 +0300)]
Use System.lineSeparator() instead of hand-crafted method

2 years agoMake IStateListener.aboutToCompareClasspaths use typed lists
Alexander Kriegisch [Mon, 18 Apr 2022 05:51:42 +0000 (12:51 +0700)]
Make IStateListener.aboutToCompareClasspaths use typed lists

Before, the signature was:

void aboutToCompareClasspaths(
  List oldClasspath, List newClasspath);

Now it is:

void aboutToCompareClasspaths(
  List<String> oldClasspath, List<String> newClasspath);

AJDT will also use the typed version after generics refactoring.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoCleanup redundant null check before instanceof
Andrey Turbanov [Sun, 17 Apr 2022 13:07:57 +0000 (16:07 +0300)]
Cleanup redundant null check before instanceof

2 years agoDo not use String literal as synchronized lock
Andrey Turbanov [Thu, 14 Apr 2022 07:33:48 +0000 (10:33 +0300)]
Do not use String literal as synchronized lock

2 years agoReduce 'Object' class usage
Andrey Turbanov [Wed, 13 Apr 2022 10:51:39 +0000 (13:51 +0300)]
Reduce 'Object' class usage

2 years agoFix suspicious Map.get call
Andrey Turbanov [Wed, 13 Apr 2022 09:56:23 +0000 (12:56 +0300)]
Fix suspicious Map.get call

2 years agoMerge pull request #155 from turbanoff/cleanup_redundant_casts
Andy Clement [Tue, 12 Apr 2022 15:27:46 +0000 (08:27 -0700)]
Merge pull request #155 from turbanoff/cleanup_redundant_casts

Remove redundant casts after generics update

2 years agoRemove redundant casts after generics update 155/head
Andrey Turbanov [Tue, 12 Apr 2022 08:22:29 +0000 (11:22 +0300)]
Remove redundant casts after generics update

2 years agoMerge pull request #131 from turbanoff/use_generics_ajdt.core
Andy Clement [Mon, 11 Apr 2022 21:17:43 +0000 (14:17 -0700)]
Merge pull request #131 from turbanoff/use_generics_ajdt.core

Update 'org.aspectj.ajdt.core' code to use generics

2 years agoBcelWorld.reportMatch: handle 'kind.getName() == null' correctly
Alexander Kriegisch [Sun, 10 Apr 2022 02:40:41 +0000 (09:40 +0700)]
BcelWorld.reportMatch: handle 'kind.getName() == null' correctly

Fixes #153.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoMake TypeSafeEnum immutable
Alexander Kriegisch [Sun, 10 Apr 2022 02:38:16 +0000 (09:38 +0700)]
Make TypeSafeEnum immutable

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoJavaVersionCompatibility.md: add link to "Java language changes since Java 9"
Alexander Kriegisch [Sun, 10 Apr 2022 01:11:03 +0000 (08:11 +0700)]
JavaVersionCompatibility.md: add link to "Java language changes since Java 9"

https://docs.oracle.com/en/java/javase/18/language/java-language-changes.html
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoRemove obsolete comments in POM mentioning GitHub Packages
Alexander Kriegisch [Sun, 10 Apr 2022 01:09:35 +0000 (08:09 +0700)]
Remove obsolete comments in POM mentioning GitHub Packages

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoMerge pull request #151 from eclipse/150-improve-ci-build
Alexander Kriegisch [Sat, 2 Apr 2022 05:38:17 +0000 (12:38 +0700)]
Merge pull request #151 from eclipse/150-improve-ci-build

Improve CI build: create docs, use Maven cache, attach artifacts

2 years agoCI build: attach main artifacts to build 151/head
Alexander Kriegisch [Sat, 2 Apr 2022 03:09:49 +0000 (10:09 +0700)]
CI build: attach main artifacts to build

Relates to #150.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoCI build: create docs and attach them to build
Alexander Kriegisch [Sat, 2 Apr 2022 03:09:08 +0000 (10:09 +0700)]
CI build: create docs and attach them to build

In order to create the docs separately, running just a single module,
add 'install' to the previous build step, so the 'docs' module can find
the 'lib' dummy JAR in the local Maven repo.

Relates to #150.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoCI build: use Maven cache
Alexander Kriegisch [Sat, 2 Apr 2022 03:07:34 +0000 (10:07 +0700)]
CI build: use Maven cache

Relates to #150.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoMerge pull request #149 from eclipse/148-remove-aspectj-browser
Alexander Kriegisch [Sat, 2 Apr 2022 02:58:16 +0000 (09:58 +0700)]
Merge pull request #149 from eclipse/148-remove-aspectj-browser

Remove AspectJ Browser

2 years agoRemove AspectJ Browser (ajbrowser) code and documentation 149/head
Alexander Kriegisch [Sat, 2 Apr 2022 01:22:42 +0000 (08:22 +0700)]
Remove AspectJ Browser (ajbrowser) code and documentation

Closes #148.

TODO: Should more AJDE stuff be removed?
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoDelete unused directories org.aspectj.lib, shadows.org.eclipse.jdt.core
Alexander Kriegisch [Fri, 1 Apr 2022 14:42:02 +0000 (21:42 +0700)]
Delete unused directories org.aspectj.lib, shadows.org.eclipse.jdt.core

I have not used those directories or any files inside them at all. I
hope I am not taking away anything helpful from people who prefer
working with inter-linked Eclipse projects instead of Maven, but I think
we will notice if anyone complains and can revert in case of an
emergency.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoRemove Aspectj.dev artifact and plugin repositories
Alexander Kriegisch [Fri, 1 Apr 2022 05:47:05 +0000 (12:47 +0700)]
Remove Aspectj.dev artifact and plugin repositories

After having removed the custom-built Maven Shade version, there should
be no more references to artifacts in that repository left. Let us see
if the build passes.

Furthermore, since being a committer, I can also attach AspectJ
installers to GitHub releases.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoBump Maven Shade Plugin to 3.3.0, add TODO to remove Flatten Maven Plugin
Alexander Kriegisch [Fri, 1 Apr 2022 05:42:36 +0000 (12:42 +0700)]
Bump Maven Shade Plugin to 3.3.0, add TODO to remove Flatten Maven Plugin

Fixed issues of concern include MSHADE-252, MSHADE-396, MSHADE-391.
TODO: MSHADE-36 is in Maven Shade 3.3.0 -> it should be possible to
include the dependency-reduced POM there directly. So maybe, we can rid
of Flatten Maven Plugin.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoSet version to 1.9.10-SNAPSHOT
Alexander Kriegisch [Thu, 31 Mar 2022 12:11:46 +0000 (19:11 +0700)]
Set version to 1.9.10-SNAPSHOT

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoRelease AspectJ version 1.9.9.1 V1_9_9_1
Alexander Kriegisch [Thu, 31 Mar 2022 12:09:44 +0000 (19:09 +0700)]
Release AspectJ version 1.9.9.1

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoBump JDT Core to 1.9.9.1
Alexander Kriegisch [Thu, 31 Mar 2022 11:48:34 +0000 (18:48 +0700)]
Bump JDT Core to 1.9.9.1

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoAdd AspectJ 1.9.9.1 delta to existing 1.9.9 release notes
Alexander Kriegisch [Thu, 31 Mar 2022 11:24:00 +0000 (18:24 +0700)]
Add AspectJ 1.9.9.1 delta to existing 1.9.9 release notes

The minor release from a user perspective is just going to be about

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
#145, so we are not creating an extra release notes document.

2 years agoUseJDKExtendedCharsets.java: add "how to fix test" comment
Alexander Kriegisch [Thu, 31 Mar 2022 08:21:13 +0000 (15:21 +0700)]
UseJDKExtendedCharsets.java: add "how to fix test" comment

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoMerge pull request #147 from kriegaex/revert-full-ltw-java18
Alexander Kriegisch [Thu, 31 Mar 2022 08:09:12 +0000 (15:09 +0700)]
Merge pull request #147 from kriegaex/revert-full-ltw-java18

Fix JDK-version-dependent test JVM arguments in POM

2 years agoRevert "Fix more LTW tests" 147/head
Alexander Kriegisch [Thu, 31 Mar 2022 07:24:03 +0000 (14:24 +0700)]
Revert "Fix more LTW tests"

This reverts commit 63d5e3e893bd149245465de1610716930998dec8.

2 years agoRevert "AtAjLTWTests: 4 test cases switched to 'useFullLTW' mode"
Alexander Kriegisch [Thu, 31 Mar 2022 05:54:08 +0000 (12:54 +0700)]
Revert "AtAjLTWTests: 4 test cases switched to 'useFullLTW' mode"

This reverts commit 5288ef1c1c8be2df85e59740f41622f4cfb9d899.

2 years agoRevert "A few dozen more tests need 'useFullLTW' mode"
Alexander Kriegisch [Thu, 31 Mar 2022 05:54:07 +0000 (12:54 +0700)]
Revert "A few dozen more tests need 'useFullLTW' mode"

This reverts commit 8c15d83a466843b5dba8ba454329baaca0080cc5.

2 years agoPOM bug: separate jvm.arg.allowSecurityManager from jvm.arg.addOpens
Alexander Kriegisch [Thu, 31 Mar 2022 05:50:14 +0000 (12:50 +0700)]
POM bug: separate jvm.arg.allowSecurityManager from jvm.arg.addOpens

Before, this was in a single variable, and for JDK 18+, the security
manager setting also falsely overwrote the '--add-opens' command. This
was the root cause for a few dozen LTW tests to fail on JDK 18, if they
were not run in full LTW mode, i.e. in a separate JVM.

After this fix, it should be possible to revert the corresponding
commits, at least their non-cosmetic parts.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoMerge pull request #146 from kriegaex/gh-145
Alexander Kriegisch [Thu, 31 Mar 2022 07:34:00 +0000 (14:34 +0700)]
Merge pull request #146 from kriegaex/gh-145

Make AJC respect `--add-reads` and `--add-exports`

2 years agoAdd some smoke test cases for '--add-reads' and '--add-modules' 146/head
Alexander Kriegisch [Thu, 31 Mar 2022 04:31:20 +0000 (11:31 +0700)]
Add some smoke test cases for '--add-reads' and '--add-modules'

in order to show that the compiler options basically work. The test
cases are by no means exhaustive and simply verify that it works at all.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoAjcTestCase: be less verbose when appending to buffer repeatedly
Alexander Kriegisch [Thu, 31 Mar 2022 04:21:40 +0000 (11:21 +0700)]
AjcTestCase: be less verbose when appending to buffer repeatedly

Also put 'else (if)' and 'finally' on new lines rather than after the
preceding closing curly braces. This helps IDEs when using code folding
(show/hide content of code blocks enclosed in curly braces).

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoMake sure to always print commands when running Java test classes
Alexander Kriegisch [Thu, 31 Mar 2022 04:18:47 +0000 (11:18 +0700)]
Make sure to always print commands when running Java test classes

In some cases, the 'java ...' command was not printed, which is
especially unhelpful when tests fail.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoUse upstream method to generate '--add-reads', '--add-exports' info
Alexander Kriegisch [Sun, 27 Mar 2022 07:12:04 +0000 (14:12 +0700)]
Use upstream method to generate '--add-reads', '--add-exports' info

and copy it into our FileSystem instance. In order to be able to access
JDT Core's FileSystem.moduleUpdates field, we had to make it public
there first.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoAdd test case + experimental fix for AJC option '--add-exports'
Alexander Kriegisch [Sun, 27 Mar 2022 05:57:19 +0000 (12:57 +0700)]
Add test case + experimental fix for AJC option '--add-exports'

I am expecting the test case to pass, but other tests to fail. This
temporary commit is meant to create feedback from GitHub CI test runs.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoIDE.md: add download info for AspectJ installer
Alexander Kriegisch [Thu, 24 Mar 2022 16:45:39 +0000 (23:45 +0700)]
IDE.md: add download info for AspectJ installer

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
2 years agoMerge pull request #140 from kriegaex/java-18
Alexander Kriegisch [Thu, 24 Mar 2022 16:20:42 +0000 (23:20 +0700)]
Merge pull request #140 from kriegaex/java-18

Prepare code, tests and docs for Java 18

2 years agoIDE.md: update AJDT update site infos for 4.23 140/head
Alexander Kriegisch [Thu, 24 Mar 2022 16:16:09 +0000 (23:16 +0700)]
IDE.md: update AJDT update site infos for 4.23

Also add some Eclipse, AspectJ and Java version information to the
existing update sites.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
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 agoUpdate 'org.aspectj.ajdt.core' code to use generics 131/head
Andrey Turbanov [Sun, 27 Feb 2022 21:07:01 +0000 (00:07 +0300)]
Update 'org.aspectj.ajdt.core' code to use generics