Skip to content

Commit

Permalink
Merge pull request #116 from kriegaex/release-198
Browse files Browse the repository at this point in the history
Add more info to 1.9.8 release notes
  • Loading branch information
aclement committed Jan 18, 2022
2 parents b720626 + 068381d commit 065a854
Showing 1 changed file with 53 additions and 22 deletions.
75 changes: 53 additions & 22 deletions docs/dist/doc/README-198.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,6 @@ <h2>New features</h2>
<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>

Expand All @@ -55,6 +45,22 @@ <h2>Improvements</h2>
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>
Expand All @@ -75,16 +81,6 @@ <h2>Code examples</h2>
</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>
Expand All @@ -98,7 +94,6 @@ <h2>Other changes and bug fixes</h2>
</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
Expand All @@ -114,10 +109,46 @@ <h2>Other changes and bug fixes</h2>
<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>
Expand Down

0 comments on commit 065a854

Please sign in to comment.