Browse Source

Merge pull request #116 from kriegaex/release-198

Add more info to 1.9.8 release notes
tags/V1_9_8
Andy Clement 2 years ago
parent
commit
065a854ee6
No account linked to committer's email address
1 changed files with 53 additions and 22 deletions
  1. 53
    22
      docs/dist/doc/README-198.html

+ 53
- 22
docs/dist/doc/README-198.html View File

@@ -37,16 +37,6 @@
<li>Sealed classes (final in Java 17, previews in Java 15, 16 and AspectJ 1.9.7)</li>
<li>Pattern matching for <tt>switch</tt></li>
</ul>
<p>
For features marked as preview on a given JDK, you need to compile with <tt>ajc --enable-preview</tt> and run with
<tt>java --enable-preview</tt> on that JDK.
</p>
<p>
Please note that you cannot run code compiled with preview features on any other JDK than the one used for
compilation. For example, records compiled with preview on JDK 15 cannot be used on JDK 16 without recompilation. This
is a JVM limitation unrelated to AspectJ. Also, e.g. sealed classes are preview-1 on JDK 15 and preview-2 on JDK 16.
You still need to recompile, no matter what.
</p>

<h2>Improvements</h2>

@@ -55,6 +45,22 @@
supported by AJC. Previously, the option existed (inherited by ECJ) but did not work correctly.
</p>

<p>
The following new properties can improve performance, e.g. Spring start-up time:
</p>
<ul>
<li><tt>org.aspectj.apache.bcel.useSingleRepositoryInstance</tt></li>
<li><tt>org.aspectj.apache.bcel.useUnavailableClassesCache</tt></li>
<li><tt>org.aspectj.apache.bcel.ignoreCacheClearRequests</tt></li>
</ul>
<p>
For now, they all default to <tt>false</tt> for backward compatibility. This might change in a future Aspect release,
if user feedback is positive and no negative side effects are found. Please try using them as much as you can and
report back questions (to the AspectJ users mailing list) or problems (as a GitHub issue), if any. Thanks to Stefan
Starke for his contribution. See also <a href="https://github.com/eclipse/org.aspectj/pull/37">PR #37</a>.
</p>


<h2>Code examples</h2>

<p>
@@ -75,16 +81,6 @@
</li>
</ul>

<h2>Using LTW on Java 16+</h2>

<p>
Please note that if you want to use load-time weaving on Java 16+, the weaving agent collides with
<a href="https://openjdk.java.net/jeps/396">JEP 396 (Strongly Encapsulate JDK Internals by Default)</a>. Therefore,
you need to set the JVM parameter <tt>--add-opens java.base/java.lang=ALL-UNNAMED</tt> in order to enable aspect
weaving. This is due to the fact that the weaver uses internal APIs for which we have not found an adequate
replacement yet when defining classes in different classloaders.
</p>

<h2>Other changes and bug fixes</h2>

<ul>
@@ -98,7 +94,6 @@
</li>
<li>Document build profiles and properties in <i>docs/developer/BUILD.md</i></li>
<li>Add a guide for setting up an AspectJ development environment in <i>docs/developer/IDE.md</i></li>
<li>Allow JAR saving if <tt>-proceedOnError</tt> is specified</li>
<li>
Fix <a href="https://github.com/eclipse/org.aspectj/issues/105">issue #105</a>: Compilation fails when using an
aspect library via <tt>-aspectpath</tt> in combination with introducing an annotation via ITD. This was broken since
@@ -114,10 +109,46 @@
<a href="https://github.com/eclipse/org.aspectj/blob/de63b63d/tests/bugs198/github_68/Generator.java#L50-L61">
craft a condy class with ASM</a>.
</li>
<li>
Fix <a href="https://github.com/eclipse/org.aspectj/issues/115">issue #115</a>: In annotation-style pointcuts,
<tt>if(false)</tt> and <tt>if(true)</tt> now work as expected and do not require a boolean return value and body for
the <tt>@Pointcut</tt> method.
</li>
<li>
Thanks to Andrey Turbanov for several clean code contributions and to Dmitry Mikhaylov for fixing a potential
concurrency problem.
</li>
</ul>

<h2>AspectJ usage hints</h2>

<h3>Use LTW on Java 16+</h3>

<p>
Please note that if you want to use load-time weaving on Java 16+, the weaving agent collides with
<a href="https://openjdk.java.net/jeps/396">JEP 396 (Strongly Encapsulate JDK Internals by Default)</a>. Therefore,
you need to set the JVM parameter <tt>--add-opens java.base/java.lang=ALL-UNNAMED</tt> in order to enable aspect
weaving. This is due to the fact that the weaver uses internal APIs for which we have not found an adequate
replacement yet when defining classes in different classloaders.
</p>

<h3>Compile with Java preview features</h3>

<p>
For features marked as preview on a given JDK, you need to compile with <tt>ajc --enable-preview</tt> and run with
<tt>java --enable-preview</tt> on that JDK.
</p>
<p>
Please note that you cannot run code compiled with preview features on any other JDK than the one used for
compilation. For example, records compiled with preview on JDK 15 cannot be used on JDK 16 without recompilation. This
is a JVM limitation unrelated to AspectJ. Also, e.g. sealed classes are preview-1 on JDK 15 and preview-2 on JDK 16.
You still need to recompile, no matter what.
</p>

<hr>

<p>
Available: 1.9.8 available DD-MMM-2021
<b>Available:</b> 1.9.8 available DD-MMM-2022
</p>

</body>

Loading…
Cancel
Save