]> source.dussan.org Git - aspectj.git/log
aspectj.git
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

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>