Skip to content

Commit 415f472

Browse files
committed
Upgrading to Java25
Nothing too complicated here. AnnotationResolved was moved in JDT from TagBits to ExtendedTagBits but that was an easy change to include. Migrated some tests from 1924tests to 1925tests because strictly speaking they were fixes after 1.9.24 were released but there was no 1.9.24.1 to include them. Slightly tweaked the test launcher code because compact source files allow non public static main methods (added some basic tests for that and the weaving of such types). Add some weaving tests for the less strict constructor format too (super() calls don't have to be first in the constructor now).
1 parent 2b0e11d commit 415f472

File tree

47 files changed

+685
-109
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+685
-109
lines changed

.github/workflows/maven.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
matrix:
2525
# AspectJ_JDK_Update: Always keep LTS versions + latest version supported by JDT Core
2626
# Check for available Temurin releases on https://adoptium.net/releases.html
27-
java: [ 17, 21, 22, 23 ]
27+
java: [ 17, 21, 25 ]
2828

2929
runs-on: ubuntu-latest
3030

docs/devguide/ajc.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,11 +178,11 @@ Limitations which apply to both LTW and CTW modes include:
178178
<Directory> defaults to the current working dir.
179179

180180
// AspectJ_JDK_Update: increment max. version and, if necessary, min. version
181-
`-source <[1.3 to 22]>`::
181+
`-source <[1.8 to 25]>`::
182182
Set source file Java language level
183-
`-target <[1.3 to 22]>`::
183+
`-target <[1.8 to 25]>`::
184184
Set classfile Java bytecode level
185-
`-<[1.3 to 22]>`::
185+
`-<[1.8 to 25]>`::
186186
Set compiler compliance level. Implies identical `-source` and `-target` levels.
187187
E.g., `-11` implies `-source 11` and `-target 11`.
188188

docs/index.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ JDK to run
9898
// AspectJ_JDK_Update: add new release to table
9999
|Release notes |Release notes, describing new features, improvements, bugfixes per AspectJ version: +
100100
+
101+
xref:release/README-1.9.25.adoc[1.9.25],
101102
xref:release/README-1.9.24.adoc[1.9.24],
102103
xref:release/README-1.9.23.adoc[1.9.23],
103104
xref:release/README-1.9.22.adoc[1.9.22 / 1.9.22.1],

docs/release/JavaVersionCompatibility.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ be easily concluded from the AspectJ version number anymore, and we are sorry fo
99
[%autowidth, stripes=even, options="header"]
1010
|===
1111
|AspectJ version |Java version |Comments
12+
|1.9.25 |25 |
1213
|1.9.24 |24 |
1314
|1.9.23 |23 |
1415
|1.9.22 - 1.9.22.1 |22 |

docs/release/README-1.9.24.adoc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44

55
= AspectJ 1.9.24
66

7-
// AspectJ_JDK_Update: Each a.b.c release needs a new release notes document. For a.b.c.d minors, the existing a.b.c
8-
// document can be updated. After copying this document, remove the comment from the previous one.
9-
107
_© Copyright 2025 Contributors. All rights reserved._
118

129
_Release info: 1.9.24 available 28-Mar-2025_

docs/release/README-1.9.25.adoc

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
= AspectJ 1.9.25
2+
:doctype: book
3+
:leveloffset: +1
4+
5+
= AspectJ 1.9.25
6+
7+
// AspectJ_JDK_Update: Each a.b.c release needs a new release notes document. For a.b.c.d minors, the existing a.b.c
8+
// document can be updated. After copying this document, remove the comment from the previous one.
9+
10+
_© Copyright 2025 Contributors. All rights reserved._
11+
12+
_Release info: 1.9.25 available 27-Oct-2025_
13+
14+
Please note that Bugzilla for issue management is deprecated and new issues should be filed as
15+
https://github.com/eclipse-aspectj/aspectj/issues/new[GitHub issues]. The list of issues addressed for 1.9.25 can be
16+
found here:
17+
18+
* https://github.com/eclipse-aspectj/aspectj/issues?q=is%3Aissue+is%3Aclosed++milestone%3A1.9.25[GitHub 1.9.25]
19+
* https://bugs.eclipse.org/bugs/buglist.cgi?bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&f0=OP&f1=OP&f3=CP&f4=CP&j1=OR&list_id=16866879&product=AspectJ&query_format=advanced&target_milestone=1.9.25[Bugzilla 1.9.25]
20+
21+
== New features
22+
23+
AspectJ 1.9.25 supports https://openjdk.java.net/projects/jdk/25/[Java 25], its final and preview features:
24+
25+
* 470: PEM Encodings of Cryptographic Objects (Preview)
26+
* 502: Stable Values (Preview)
27+
* 503: Remove the 32-bit x86 Port
28+
* 505: Structured Concurrency (Fifth Preview)
29+
* 506: Scoped Values
30+
* 507: Primitive Types in Patterns, instanceof, and switch (Third Preview)
31+
* 508: Vector API (Tenth Incubator)
32+
* 509: JFR CPU-Time Profiling (Experimental)
33+
* 510: Key Derivation Function API
34+
* 511: Module Import Declarations
35+
* 512: Compact Source Files and Instance Main Methods
36+
* 513: Flexible Constructor Bodies
37+
* 514: Ahead-of-Time Command-Line Ergonomics
38+
* 515: Ahead-of-Time Method Profiling
39+
* 518: JFR Cooperative Sampling
40+
* 519: Compact Object Headers
41+
* 520: JFR Method Timing & Tracing
42+
* 521: Generational Shenandoah
43+
44+
Some of these are API/JVM only so don't affect the compiler and should just work on Java 25 runtimes.
45+
46+
== Improvements
47+
48+
* No major improvements
49+
50+
== Other changes and bug fixes
51+
52+
Importantly with the adoption of JDT Compiler later than 22, the versions of Java 1.1 > 1.7 are considered no longer
53+
supported so any attempt to specify a build for any of those Java versions will now fail immediately.
54+
55+
== AspectJ usage hints
56+
57+
[[ajc_build_system_requirements]]
58+
=== AspectJ compiler build system requirements
59+
60+
Since 1.9.21, the AspectJ compiler `ajc` (contained in the `aspectjtools` library) no longer works on JDKs 11 to 16. The
61+
minimum compile-time requirement is now JDK 17 due to upstream changes in the Eclipse Java Compiler (subset of JDT
62+
Core), which AspectJ is a fork of. You can still compile to legacy target versions as low as Java 1.3 when compiling
63+
plain Java code or using plain Java ITD constructs which do not require the AspectJ runtime `aspectjrt`, but the
64+
compiler itself needs JDK 17+. Just like in previous AspectJ versions, both the runtime `aspectjrt` and the load-time
65+
weaver `aspectjweaver` still only require JRE 8+.
66+
67+
History: Since 1.9.8, the AspectJ compiler ajc needed JDK 11+, before then JDK 8+.
68+
69+
[[ltw_java_16]]
70+
=== Use LTW on Java 16+
71+
72+
**Since AspectJ 1.9.21.1, using `--add-opens` is no longer necessary!** The additional JVM command-line option was
73+
necessary for LTW on JRE 16+ in all AspectJ versions up to 1.9.21. Since AspectJ 1.9.21.1, the LTW agent uses an
74+
alternative approach for defining new classes during weaving, which works without `--add-opens` - at least for now, i.e.
75+
JDKs 8 to 22. There still is no canonical solution, because link:https://bugs.openjdk.org/browse/JDK-8200559[JDK-8200559]
76+
is still unresolved since 2018.
77+
78+
[[compile_with_preview]]
79+
=== Compile with Java preview features
80+
81+
For features marked as preview on a given JDK, you need to compile with `ajc --enable-preview` and run with
82+
`java --enable-preview` on that JDK.
83+
84+
Please note, that you cannot run code compiled with preview features on any other JDK than the one used for compilation.
85+
For example, records compiled with preview on JDK 15 cannot be used on JDK 16 without recompilation. This is a JVM
86+
limitation unrelated to AspectJ. Also, e.g. sealed classes are preview-1 on JDK 15 and preview-2 on JDK 16. You still
87+
need to recompile, no matter what.

lib/aspectj/lib/aspectjrt.jar

5.84 KB
Binary file not shown.

lib/aspectj/lib/aspectjtools.jar

180 KB
Binary file not shown.

lib/aspectj/lib/aspectjweaver.jar

9.25 KB
Binary file not shown.

lib/test/aspectjrt.jar

5.85 KB
Binary file not shown.

0 commit comments

Comments
 (0)