From ef87efb9056861980104c9bad63223590e29bc44 Mon Sep 17 00:00:00 2001 From: Alexander Kriegisch Date: Mon, 19 Jul 2021 12:11:38 +0700 Subject: [PATCH] Improve release notes formatting Also unify the way copyright and release date is displayed Signed-off-by: Alexander Kriegisch --- docs/dist/doc/README-11.adoc | 6 +- docs/dist/doc/README-12.adoc | 4 +- docs/dist/doc/README-121.adoc | 4 +- docs/dist/doc/README-150.adoc | 9 +- docs/dist/doc/README-151.adoc | 4 +- docs/dist/doc/README-152.adoc | 4 +- docs/dist/doc/README-153.adoc | 4 +- docs/dist/doc/README-154.adoc | 4 +- docs/dist/doc/README-160.adoc | 4 +- docs/dist/doc/README-161.adoc | 4 +- docs/dist/doc/README-1610.adoc | 6 +- docs/dist/doc/README-1611.adoc | 8 +- docs/dist/doc/README-1612.adoc | 17 +- docs/dist/doc/README-162.adoc | 4 +- docs/dist/doc/README-163.adoc | 4 +- docs/dist/doc/README-164.adoc | 4 +- docs/dist/doc/README-165.adoc | 4 +- docs/dist/doc/README-166.adoc | 4 +- docs/dist/doc/README-167.adoc | 4 +- docs/dist/doc/README-168.adoc | 4 +- docs/dist/doc/README-169.adoc | 4 +- docs/dist/doc/README-170.adoc | 12 +- docs/dist/doc/README-171.adoc | 8 +- docs/dist/doc/README-172.adoc | 8 +- docs/dist/doc/README-173.adoc | 8 +- docs/dist/doc/README-174.adoc | 8 +- docs/dist/doc/README-180.adoc | 12 +- docs/dist/doc/README-181.adoc | 8 +- docs/dist/doc/README-1810.adoc | 8 +- docs/dist/doc/README-1811.adoc | 8 +- docs/dist/doc/README-182.adoc | 8 +- docs/dist/doc/README-183.adoc | 8 +- docs/dist/doc/README-184.adoc | 8 +- docs/dist/doc/README-185.adoc | 8 +- docs/dist/doc/README-186.adoc | 10 +- docs/dist/doc/README-187.adoc | 8 +- docs/dist/doc/README-188.adoc | 8 +- docs/dist/doc/README-189.adoc | 8 +- docs/dist/doc/README-190.adoc | 138 +++++------ docs/dist/doc/README-191.adoc | 29 +-- docs/dist/doc/README-192.adoc | 11 +- docs/dist/doc/README-193.adoc | 65 +++-- docs/dist/doc/README-194.adoc | 20 +- docs/dist/doc/README-195.adoc | 20 +- docs/dist/doc/README-196.adoc | 21 +- docs/dist/doc/README-197.adoc | 22 +- docs/dist/doc/changes.adoc | 22 +- docs/dist/doc/porting.adoc | 436 ++++++++++++++++----------------- 48 files changed, 474 insertions(+), 566 deletions(-) diff --git a/docs/dist/doc/README-11.adoc b/docs/dist/doc/README-11.adoc index 1843f38be..a56521fac 100644 --- a/docs/dist/doc/README-11.adoc +++ b/docs/dist/doc/README-11.adoc @@ -1,8 +1,8 @@ [[readme-1_1]] -== AspectJ 1.1 Readme +== AspectJ 1.1 -[.small]#© Copyright 2002 Palo Alto Research Center, Incorporated, 2003 -Contributors. All rights reserved.# +_© Copyright 2002 Palo Alto Research Center, Incorporated, 2003 +Contributors. All rights reserved._ This is the initial release of AspectJ 1.1. It includes a small number of new language features as well as major improvements to the diff --git a/docs/dist/doc/README-12.adoc b/docs/dist/doc/README-12.adoc index 0b66b6556..92b46eb55 100644 --- a/docs/dist/doc/README-12.adoc +++ b/docs/dist/doc/README-12.adoc @@ -1,6 +1,6 @@ -[.small]#© Copyright 2003,2004 Contributors. All rights reserved.# +== AspectJ 1.2 -== AspectJ 1.2 Readme +_© Copyright 2003,2004 Contributors. All rights reserved._ The definition of the AspectJ language is unchanged in the 1.2 release. Instead, AspectJ 1.2 provides major improvements to the functionality of diff --git a/docs/dist/doc/README-121.adoc b/docs/dist/doc/README-121.adoc index fd082ebcb..c51bb81df 100644 --- a/docs/dist/doc/README-121.adoc +++ b/docs/dist/doc/README-121.adoc @@ -1,6 +1,6 @@ -[.small]#© Copyright 2004 Contributors. All rights reserved.# +== AspectJ 1.2.1 -== AspectJ 1.2.1 Readme +_© Copyright 2004 Contributors. All rights reserved._ AspectJ 1.2.1 is largely a bug-fix release and the definition of the AspectJ language is unchanged from the 1.2.0 release (with the exception diff --git a/docs/dist/doc/README-150.adoc b/docs/dist/doc/README-150.adoc index 2f29cc894..292048467 100644 --- a/docs/dist/doc/README-150.adoc +++ b/docs/dist/doc/README-150.adoc @@ -1,6 +1,6 @@ -[.small]#© Copyright 2005 Contributors. All rights reserved.# +== AspectJ 5 -== AspectJ 5 Readme +_© Copyright 2005 Contributors. All rights reserved._ AspectJ 5 introduces several important changes to the language and tools in order to support Java 5 and extend the capabilities of AspectJ in @@ -12,9 +12,8 @@ AspectJ 5]. Some of the other documentation has not been updated for AspectJ 5. For the latest documentation, see -http://eclipse.org/aspectj/doc/next/index.html , linked off -http://eclipse.org/aspectj/docs.php[the AspectJ documentation home page] -. +http://eclipse.org/aspectj/doc/next/index.html, linked off +http://eclipse.org/aspectj/docs.php[the AspectJ documentation home page]. For information on bug fixes in AspectJ 5 v1.5.0, see the link:changes.html[changes] document. diff --git a/docs/dist/doc/README-151.adoc b/docs/dist/doc/README-151.adoc index 6216cd0c3..bc513d512 100644 --- a/docs/dist/doc/README-151.adoc +++ b/docs/dist/doc/README-151.adoc @@ -1,7 +1,7 @@ -[.small]#© Copyright 2006 Contributors. All rights reserved.# - == AspectJ 5 v1.5.1 Readme +_© Copyright 2006 Contributors. All rights reserved._ + This release is primarily a bug fix and performance / memory usage release. Over 70 fixes and enhancements have been incorporated since 1.5.0, you can see the list through diff --git a/docs/dist/doc/README-152.adoc b/docs/dist/doc/README-152.adoc index 99ac5a87d..b903a9841 100644 --- a/docs/dist/doc/README-152.adoc +++ b/docs/dist/doc/README-152.adoc @@ -1,7 +1,7 @@ -[.small]#© Copyright 2006 Contributors. All rights reserved.# - == AspectJ 5 v1.5.2 Readme +_© Copyright 2006 Contributors. All rights reserved._ + This release is primarily a bug fix release. It includes approximately 60 fixes and enhancements that have been incorporated since the 1.5.1 release. You can see the full list through diff --git a/docs/dist/doc/README-153.adoc b/docs/dist/doc/README-153.adoc index 422b34447..1b8344e53 100644 --- a/docs/dist/doc/README-153.adoc +++ b/docs/dist/doc/README-153.adoc @@ -1,7 +1,7 @@ -[.small]#© Copyright 2006 Contributors. All rights reserved.# - == AspectJ 5 v1.5.3 Readme +_© Copyright 2006 Contributors. All rights reserved._ + This release includes a number of bug fixes and enhancements (over 80). The full list of resolved issues can be found with https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=&product=AspectJ&target_milestone=1.5.3&long_desc_type=allwordssubstr&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&status_whiteboard_type=allwordssubstr&status_whiteboard=&keywords_type=allwords&keywords=&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&emailtype1=substring&email1=&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&chfieldfrom=&chfieldto=Now&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&field0-0-0=noop&type0-0-0=noop&value0-0-0=[this diff --git a/docs/dist/doc/README-154.adoc b/docs/dist/doc/README-154.adoc index 4565910d8..7c8fa50cc 100644 --- a/docs/dist/doc/README-154.adoc +++ b/docs/dist/doc/README-154.adoc @@ -1,7 +1,7 @@ -[.small]#© Copyright 2006 Contributors. All rights reserved.# - == AspectJ 5 v1.5.4 Readme +_© Copyright 2006 Contributors. All rights reserved._ + This release includes a number of bug fixes and enhancements. The full list of resolved issues can be found with https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=&product=AspectJ&target_milestone=1.5.4&long_desc_type=allwordssubstr&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&status_whiteboard_type=allwordssubstr&status_whiteboard=&keywords_type=allwords&keywords=&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&emailtype1=substring&email1=&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&chfieldfrom=&chfieldto=Now&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&field0-0-0=noop&type0-0-0=noop&value0-0-0=[this diff --git a/docs/dist/doc/README-160.adoc b/docs/dist/doc/README-160.adoc index d62985634..492c56fc4 100644 --- a/docs/dist/doc/README-160.adoc +++ b/docs/dist/doc/README-160.adoc @@ -1,6 +1,6 @@ -[.small]#© Copyright 2008 Contributors. All rights reserved.# +== AspectJ 1.6.0 -== AspectJ v1.6.0 Readme +_© Copyright 2008 Contributors. All rights reserved._ === AspectJ v1.6.0 - 23 Apr 2008 diff --git a/docs/dist/doc/README-161.adoc b/docs/dist/doc/README-161.adoc index d4ef20cf4..a59e3b0bb 100644 --- a/docs/dist/doc/README-161.adoc +++ b/docs/dist/doc/README-161.adoc @@ -1,6 +1,6 @@ -[.small]#© Copyright 2008 Contributors. All rights reserved.# +== AspectJ 1.6.1 -== AspectJ 1.6.1 Readme +_© Copyright 2008 Contributors. All rights reserved._ The main themes of AspectJ1.6.1 are better memory usage and faster weaving. This has been achieved through profiling of the weaving process diff --git a/docs/dist/doc/README-1610.adoc b/docs/dist/doc/README-1610.adoc index 73d3dab90..5f571fce9 100644 --- a/docs/dist/doc/README-1610.adoc +++ b/docs/dist/doc/README-1610.adoc @@ -1,10 +1,12 @@ -[.small]#© Copyright 2010 Contributors. All rights reserved.# +== AspectJ 1.6.10 -== AspectJ 1.6.10 Readme +_© Copyright 2010 Contributors. All rights reserved._ The full list of resolved issues in 1.6.10 is available https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced;bug_status=RESOLVED;bug_status=VERIFIED;bug_status=CLOSED;product=AspectJ;target_milestone=1.6.10;target_milestone=1.6.10M1;target_milestone=1.6.10M2;target_milestone=1.6.10RC1[here] +_Release info: 1.6.10 available 17-Nov-2010_ + === Changes 1.6.10 is primilarily just bug fixes for AspectJ, mainly in the areas of diff --git a/docs/dist/doc/README-1611.adoc b/docs/dist/doc/README-1611.adoc index d88609580..e5f4226a2 100644 --- a/docs/dist/doc/README-1611.adoc +++ b/docs/dist/doc/README-1611.adoc @@ -1,13 +1,11 @@ -[.small]#© Copyright 2010-2011 Contributors. All rights reserved.# +== AspectJ 1.6.11 -== AspectJ 1.6.11 Readme +_© Copyright 2010-2011 Contributors. All rights reserved._ The full list of resolved issues in 1.6.11 is available https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced;bug_status=RESOLVED;bug_status=VERIFIED;bug_status=CLOSED;product=AspectJ;target_milestone=1.6.11;[here] -. - -=== 1.6.11 available 15-03-2011 +_Release info: 1.6.11 available 15-Mar-2011_ === Notable Changes diff --git a/docs/dist/doc/README-1612.adoc b/docs/dist/doc/README-1612.adoc index 78a90829a..ed9951d4d 100644 --- a/docs/dist/doc/README-1612.adoc +++ b/docs/dist/doc/README-1612.adoc @@ -1,19 +1,16 @@ -[.small]#© Copyright 2010-2011 Contributors. All rights reserved.# +== AspectJ 1.6.12 -== AspectJ 1.6.12 Readme +_© Copyright 2010-2011 Contributors. All rights reserved._ The full list of resolved issues in 1.6.12 is available https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced;bug_status=RESOLVED;bug_status=VERIFIED;bug_status=CLOSED;product=AspectJ;target_milestone=1.6.12;[here] -. +_Release info:_ -=== 1.6.12 released 18-Oct-2011 - -=== 1.6.12.RC1 available 3-Oct-2011 - -=== 1.6.12.M2 available 18-Aug-2011 - -=== 1.6.12.M1 available 7-Jun-2011 + * _1.6.12 available 18-Oct-2011_ + * _1.6.12.RC1 available 3-Oct-2011_ + * _1.6.12.M2 available 18-Aug-2011_ + * _1.6.12.M1 available 7-Jun-2011_ === Notable Changes diff --git a/docs/dist/doc/README-162.adoc b/docs/dist/doc/README-162.adoc index f560778a6..081c908d1 100644 --- a/docs/dist/doc/README-162.adoc +++ b/docs/dist/doc/README-162.adoc @@ -1,6 +1,6 @@ -[.small]#© Copyright 2008 Contributors. All rights reserved.# +== AspectJ 1.6.2 -== AspectJ 1.6.2 Readme +_© Copyright 2008 Contributors. All rights reserved._ The main theme of AspectJ1.6.2 was improved IDE incremental performance and a number of changes have gone in to improve how AspectJ and AJDT diff --git a/docs/dist/doc/README-163.adoc b/docs/dist/doc/README-163.adoc index 55835f3ee..f01648abe 100644 --- a/docs/dist/doc/README-163.adoc +++ b/docs/dist/doc/README-163.adoc @@ -1,6 +1,6 @@ -[.small]#© Copyright 2008 Contributors. All rights reserved.# +== AspectJ 1.6.3 -== AspectJ 1.6.3 Readme +_© Copyright 2008 Contributors. All rights reserved._ * xref:#split[Split matching/weaving] * xref:#bugsfixed[Bugs fixed] diff --git a/docs/dist/doc/README-164.adoc b/docs/dist/doc/README-164.adoc index 548cb086e..b7c9bbe01 100644 --- a/docs/dist/doc/README-164.adoc +++ b/docs/dist/doc/README-164.adoc @@ -1,6 +1,6 @@ -[.small]#© Copyright 2009 Contributors. All rights reserved.# +== AspectJ 1.6.4 -== AspectJ 1.6.4 Readme +_© Copyright 2009 Contributors. All rights reserved._ * xref:#compilation[Compilation times] * xref:#language[Language enhancements] diff --git a/docs/dist/doc/README-165.adoc b/docs/dist/doc/README-165.adoc index 6b67ccf97..28396df40 100644 --- a/docs/dist/doc/README-165.adoc +++ b/docs/dist/doc/README-165.adoc @@ -1,6 +1,6 @@ -[.small]#© Copyright 2009 Contributors. All rights reserved.# +== AspectJ 1.6.5 -== AspectJ 1.6.5 Readme +_© Copyright 2009 Contributors. All rights reserved._ [[bugsfixed]] === Bugs fixed diff --git a/docs/dist/doc/README-166.adoc b/docs/dist/doc/README-166.adoc index b5de2009b..940b2cf96 100644 --- a/docs/dist/doc/README-166.adoc +++ b/docs/dist/doc/README-166.adoc @@ -1,6 +1,6 @@ -[.small]#© Copyright 2009 Contributors. All rights reserved.# +== AspectJ 1.6.6 -== AspectJ 1.6.6 Readme +_© Copyright 2009 Contributors. All rights reserved._ [[bugsfixed]] === Bugs fixed diff --git a/docs/dist/doc/README-167.adoc b/docs/dist/doc/README-167.adoc index 5a2a9ffcf..9104f2d18 100644 --- a/docs/dist/doc/README-167.adoc +++ b/docs/dist/doc/README-167.adoc @@ -1,6 +1,6 @@ -[.small]#© Copyright 2009 Contributors. All rights reserved.# +== AspectJ 1.6.7 -== AspectJ 1.6.7 Readme +_© Copyright 2009 Contributors. All rights reserved._ AspectJ 1.6.7 includes some radical internal changes. These improvements enable faster compilation, faster binary weaving, faster load time diff --git a/docs/dist/doc/README-168.adoc b/docs/dist/doc/README-168.adoc index 0a8e3cbb8..0adbd557a 100644 --- a/docs/dist/doc/README-168.adoc +++ b/docs/dist/doc/README-168.adoc @@ -1,6 +1,6 @@ -[.small]#© Copyright 2009 Contributors. All rights reserved.# +== AspectJ 1.6.8 -== AspectJ 1.6.8 Readme +_© Copyright 2009 Contributors. All rights reserved._ The first sentence in the 1.6.7 readme was 'AspectJ 1.6.7 includes some radical internal changes.' diff --git a/docs/dist/doc/README-169.adoc b/docs/dist/doc/README-169.adoc index 4921f23d4..943cc6d90 100644 --- a/docs/dist/doc/README-169.adoc +++ b/docs/dist/doc/README-169.adoc @@ -1,6 +1,6 @@ -[.small]#© Copyright 2010 Contributors. All rights reserved.# +== AspectJ 1.6.9 -== AspectJ 1.6.9 Readme +_© Copyright 2010 Contributors. All rights reserved._ The full list of resolved issues in 1.6.9 is available https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced;bug_status=RESOLVED;bug_status=VERIFIED;bug_status=CLOSED;product=AspectJ;target_milestone=1.6.9;target_milestone=1.6.9M1;target_milestone=1.6.9M2;target_milestone=1.6.9RC1[here] diff --git a/docs/dist/doc/README-170.adoc b/docs/dist/doc/README-170.adoc index b76f56139..2437d10ef 100644 --- a/docs/dist/doc/README-170.adoc +++ b/docs/dist/doc/README-170.adoc @@ -1,15 +1,15 @@ -[.small]#© Copyright 2011 Contributors. All rights reserved.# +== AspectJ 1.7.0 -== AspectJ 1.7.0 Readme +_© Copyright 2011 Contributors. All rights reserved._ The full list of resolved issues in 1.7.0 is available https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced;bug_status=RESOLVED;bug_status=VERIFIED;bug_status=CLOSED;product=AspectJ;target_milestone=1.7.0;[here] -. +_Release info:_ -* 1.7.0 available 2-Jul-2012 -* 1.7.0.RC1 available 25-May-2012 -* 1.7.0.M1 available 16-Dec-2011 +* _1.7.0 available 2-Jul-2012_ +* _1.7.0.RC1 available 25-May-2012_ +* _1.7.0.M1 available 16-Dec-2011_ === Notable Changes diff --git a/docs/dist/doc/README-171.adoc b/docs/dist/doc/README-171.adoc index 81712abc7..30515f0e2 100644 --- a/docs/dist/doc/README-171.adoc +++ b/docs/dist/doc/README-171.adoc @@ -1,13 +1,11 @@ -[.small]#© Copyright 2011 Contributors. All rights reserved.# +== AspectJ 1.7.1 -== AspectJ 1.7.1 Readme +_© Copyright 2011 Contributors. All rights reserved._ The full list of resolved issues in 1.7.1 is available https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced;bug_status=RESOLVED;bug_status=VERIFIED;bug_status=CLOSED;product=AspectJ;target_milestone=1.7.1;[here] -. - -* 1.7.1 available 6-Sep-2012 +_Release info: 1.7.1 available 6-Sep-2012_ === Changes diff --git a/docs/dist/doc/README-172.adoc b/docs/dist/doc/README-172.adoc index ed93e209f..52754ad8e 100644 --- a/docs/dist/doc/README-172.adoc +++ b/docs/dist/doc/README-172.adoc @@ -1,13 +1,11 @@ -[.small]#© Copyright 2011 Contributors. All rights reserved.# +== AspectJ 1.7.2 -== AspectJ 1.7.2 Readme +_© Copyright 2011 Contributors. All rights reserved._ The full list of resolved issues in 1.7.2 is available https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced;bug_status=RESOLVED;bug_status=VERIFIED;bug_status=CLOSED;product=AspectJ;target_milestone=1.7.2;[here] -. - -* 1.7.2 available 13-Feb-2013 +_Release info: 1.7.2 available 13-Feb-2013_ === Fixes: diff --git a/docs/dist/doc/README-173.adoc b/docs/dist/doc/README-173.adoc index e50304f2b..73a0ad320 100644 --- a/docs/dist/doc/README-173.adoc +++ b/docs/dist/doc/README-173.adoc @@ -1,10 +1,8 @@ -[.small]#© Copyright 2011 Contributors. All rights reserved.# +== AspectJ 1.7.3 -== AspectJ 1.7.3 Readme +_© Copyright 2011 Contributors. All rights reserved._ -Available 13-Jun-2013 +_Release info: 1.7.3 available 13-Jun-2013_ The list of resolved issues in 1.7.3 is available https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced;bug_status=RESOLVED;bug_status=VERIFIED;bug_status=CLOSED;product=AspectJ;target_milestone=1.7.3;[here] - -. diff --git a/docs/dist/doc/README-174.adoc b/docs/dist/doc/README-174.adoc index 3b55b4a43..20464744a 100644 --- a/docs/dist/doc/README-174.adoc +++ b/docs/dist/doc/README-174.adoc @@ -1,13 +1,11 @@ -[.small]#© Copyright 2013 Contributors. All rights reserved.# +== AspectJ 1.7.4 -== AspectJ 1.7.4 Readme - -Available 24-Oct-2013 +_© Copyright 2013 Contributors. All rights reserved._ The list of resolved issues in 1.7.4 is available https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced;bug_status=RESOLVED;bug_status=VERIFIED;bug_status=CLOSED;product=AspectJ;target_milestone=1.7.4;[here] -. +_Release info: 1.7.4 available 24-Oct-2013_ *Notes* diff --git a/docs/dist/doc/README-180.adoc b/docs/dist/doc/README-180.adoc index 115de3d6d..9a2ba78be 100644 --- a/docs/dist/doc/README-180.adoc +++ b/docs/dist/doc/README-180.adoc @@ -1,15 +1,15 @@ -[.small]#© Copyright 2014 Contributors. All rights reserved.# +== AspectJ 1.8.0 -== AspectJ 1.8.0 Readme +_© Copyright 2014 Contributors. All rights reserved._ The full list of resolved issues in 1.8.0 is available https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced;bug_status=RESOLVED;bug_status=VERIFIED;bug_status=CLOSED;product=AspectJ;target_milestone=1.8.0.M1;target_milestone=1.8.0;[here] -. +_Release info:_ -* 1.8.0 available 17-Apr-2014 -* 1.8.0.RC1 available 18-Mar-2014 -* 1.8.0.M1 available 29-Jul-2013 +* _1.8.0 available 17-Apr-2014_ +* _1.8.0.RC1 available 18-Mar-2014_ +* _1.8.0.M1 available 29-Jul-2013_ === Notable changes diff --git a/docs/dist/doc/README-181.adoc b/docs/dist/doc/README-181.adoc index e008473da..ef0e8a1ee 100644 --- a/docs/dist/doc/README-181.adoc +++ b/docs/dist/doc/README-181.adoc @@ -1,13 +1,11 @@ -[.small]#© Copyright 2014 Contributors. All rights reserved.# +== AspectJ 1.8.1 -== AspectJ 1.8.1 Readme +_© Copyright 2014 Contributors. All rights reserved._ The full list of resolved issues in 1.8.1 is available https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced;bug_status=RESOLVED;bug_status=VERIFIED;bug_status=CLOSED;product=AspectJ;target_milestone=1.8.1;[here] -. - -* 1.8.1 available 20-Jun-2014 +_Release info: 1.8.1 available 20-Jun-2014_ === Notable changes diff --git a/docs/dist/doc/README-1810.adoc b/docs/dist/doc/README-1810.adoc index 947dae81c..cce5da187 100644 --- a/docs/dist/doc/README-1810.adoc +++ b/docs/dist/doc/README-1810.adoc @@ -1,13 +1,11 @@ -[.small]#© Copyright 2016 Contributors. All rights reserved.# +== AspectJ 1.8.10 -== AspectJ 1.8.10 Readme +_© Copyright 2016 Contributors. All rights reserved._ The full list of resolved issues in 1.8.10 is available https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced;bug_status=RESOLVED;bug_status=VERIFIED;bug_status=CLOSED;product=AspectJ;target_milestone=1.8.10;[here] -. - -* 1.8.10 available 9-Dec-2016 +_Release info: 1.8.10 available 9-Dec-2016_ === Notable changes diff --git a/docs/dist/doc/README-1811.adoc b/docs/dist/doc/README-1811.adoc index 88b159139..dedbc0463 100644 --- a/docs/dist/doc/README-1811.adoc +++ b/docs/dist/doc/README-1811.adoc @@ -1,6 +1,8 @@ -[.small]#© Copyright 2017 Contributors. All rights reserved.# +== AspectJ 1.8.11 -== AspectJ 1.8.11 Readme +_© Copyright 2017 Contributors. All rights reserved._ + +_Release info: 1.8.11 available 26-Sep-2017_ This release is a small compatibility release to improve the behaviour of the AspectJ 1.8 line on JDK9. Importantly it includes a change that @@ -15,5 +17,3 @@ actual weaving. Although if you using Spring AOP with class level annotation retention there may still be issues. If you experience problems or need to do actual weaving on JDK9, please use AspectJ9 instead. - -* 1.8.11 available 26-Sep-2017 diff --git a/docs/dist/doc/README-182.adoc b/docs/dist/doc/README-182.adoc index 28fa7b2da..a49213617 100644 --- a/docs/dist/doc/README-182.adoc +++ b/docs/dist/doc/README-182.adoc @@ -1,13 +1,11 @@ -[.small]#© Copyright 2014 Contributors. All rights reserved.# +== AspectJ 1.8.2 -== AspectJ 1.8.2 Readme +_© Copyright 2014 Contributors. All rights reserved._ The full list of resolved issues in 1.8.2 is available https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced;bug_status=RESOLVED;bug_status=VERIFIED;bug_status=CLOSED;product=AspectJ;target_milestone=1.8.2;[here] -. - -* 1.8.2 available 14-Aug-2014 +_Release info: 1.8.2 available 14-Aug-2014_ === Notable changes diff --git a/docs/dist/doc/README-183.adoc b/docs/dist/doc/README-183.adoc index 8c615ef84..0d114d1f2 100644 --- a/docs/dist/doc/README-183.adoc +++ b/docs/dist/doc/README-183.adoc @@ -1,13 +1,11 @@ -[.small]#© Copyright 2014 Contributors. All rights reserved.# +== AspectJ 1.8.3 -== AspectJ 1.8.3 Readme +_© Copyright 2014 Contributors. All rights reserved._ The full list of resolved issues in 1.8.3 is available https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced;bug_status=RESOLVED;bug_status=VERIFIED;bug_status=CLOSED;product=AspectJ;target_milestone=1.8.3;[here] -. - -* 1.8.3 available 22-Oct-2014 +_Release info: 1.8.3 available 22-Oct-2014_ === Notable changes diff --git a/docs/dist/doc/README-184.adoc b/docs/dist/doc/README-184.adoc index 002aea1ac..1e8799cc4 100644 --- a/docs/dist/doc/README-184.adoc +++ b/docs/dist/doc/README-184.adoc @@ -1,13 +1,11 @@ -[.small]#© Copyright 2014 Contributors. All rights reserved.# +== AspectJ 1.8.4 -== AspectJ 1.8.4 Readme +_© Copyright 2014 Contributors. All rights reserved._ The full list of resolved issues in 1.8.4 is available https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced;bug_status=RESOLVED;bug_status=VERIFIED;bug_status=CLOSED;product=AspectJ;target_milestone=1.8.4;[here] -. - -* 1.8.4 available 6-Nov-2014 +_Release info: 1.8.4 available 6-Nov-2014_ === Notable changes diff --git a/docs/dist/doc/README-185.adoc b/docs/dist/doc/README-185.adoc index 909dbfecc..22fdcee3f 100644 --- a/docs/dist/doc/README-185.adoc +++ b/docs/dist/doc/README-185.adoc @@ -1,13 +1,11 @@ -[.small]#© Copyright 2015 Contributors. All rights reserved.# +== AspectJ 1.8.5 -== AspectJ 1.8.5 Readme +_© Copyright 2015 Contributors. All rights reserved._ The full list of resolved issues in 1.8.5 is available https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced;bug_status=RESOLVED;bug_status=VERIFIED;bug_status=CLOSED;product=AspectJ;target_milestone=1.8.5;[here] -. - -* 1.8.5 available 28-Jan-2015 +_Release info: 1.8.5 available 28-Jan-2015_ === Notable changes diff --git a/docs/dist/doc/README-186.adoc b/docs/dist/doc/README-186.adoc index 9810ab863..9a2129414 100644 --- a/docs/dist/doc/README-186.adoc +++ b/docs/dist/doc/README-186.adoc @@ -1,10 +1,8 @@ -[.small]#© Copyright 2015 Contributors. All rights reserved.# +== AspectJ 1.8.6 -== AspectJ 1.8.6 Readme +_© Copyright 2015 Contributors. All rights reserved._ + +_Release info: 1.8.6 available 5-Jun-2015_ The full list of resolved issues in 1.8.6 is available https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced;bug_status=RESOLVED;bug_status=VERIFIED;bug_status=CLOSED;product=AspectJ;target_milestone=1.8.6;[here] - -. - -* 1.8.6 available 5-Jun-2015 diff --git a/docs/dist/doc/README-187.adoc b/docs/dist/doc/README-187.adoc index bcc5f75cc..5d4c0de6b 100644 --- a/docs/dist/doc/README-187.adoc +++ b/docs/dist/doc/README-187.adoc @@ -1,13 +1,11 @@ -[.small]#© Copyright 2015 Contributors. All rights reserved.# +== AspectJ 1.8.7 -== AspectJ 1.8.7 Readme +_© Copyright 2015 Contributors. All rights reserved._ The full list of resolved issues in 1.8.7 is available https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced;bug_status=RESOLVED;bug_status=VERIFIED;bug_status=CLOSED;product=AspectJ;target_milestone=1.8.7;[here] -. - -* 1.8.7 available 9-Sep-2015 +_Release info: 1.8.7 available 9-Sep-2015_ === Notable changes diff --git a/docs/dist/doc/README-188.adoc b/docs/dist/doc/README-188.adoc index 3f720edac..12b59eeb9 100644 --- a/docs/dist/doc/README-188.adoc +++ b/docs/dist/doc/README-188.adoc @@ -1,13 +1,11 @@ -[.small]#© Copyright 2016 Contributors. All rights reserved.# +== AspectJ 1.8.8 -== AspectJ 1.8.8 Readme +_© Copyright 2016 Contributors. All rights reserved._ The full list of resolved issues in 1.8.8 is available https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced;bug_status=RESOLVED;bug_status=VERIFIED;bug_status=CLOSED;product=AspectJ;target_milestone=1.8.8;[here] -. - -* 1.8.8 available 7-Jan-2016 +_Release info: 1.8.8 available 7-Jan-2016_ === Notable changes diff --git a/docs/dist/doc/README-189.adoc b/docs/dist/doc/README-189.adoc index c3ecd3a56..f24bb1223 100644 --- a/docs/dist/doc/README-189.adoc +++ b/docs/dist/doc/README-189.adoc @@ -1,13 +1,11 @@ -[.small]#© Copyright 2016 Contributors. All rights reserved.# +== AspectJ 1.8.9 -== AspectJ 1.8.9 Readme +_© Copyright 2016 Contributors. All rights reserved._ The full list of resolved issues in 1.8.9 is available https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced;bug_status=RESOLVED;bug_status=VERIFIED;bug_status=CLOSED;product=AspectJ;target_milestone=1.8.9;[here] -. - -* 1.8.9 available 14-Mar-2016 +_Release info: 1.8.9 available 14-Mar-2016_ === Notable changes diff --git a/docs/dist/doc/README-190.adoc b/docs/dist/doc/README-190.adoc index 323573146..06872691c 100644 --- a/docs/dist/doc/README-190.adoc +++ b/docs/dist/doc/README-190.adoc @@ -1,23 +1,23 @@ -[.small]#© Copyright 2018 Contributors. All rights reserved.# +== AspectJ 1.9.0 + +_© Copyright 2018 Contributors. All rights reserved._ The full list of resolved issues in 1.9.0 is available 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.0[here] -. - -== AspectJ 1.9.0 +_Release info: 1.9.0 available 2-Apr-2018_ === Improved runtime interface New factory methods have been added to the AspectJ runtime. This is an -attempt to more optimally create thisJoinPoint and -thisEnclosingJoinPoint objects. The generated code that invokes these -now also uses the ability for the LDC bytecode instruction to load class +attempt to more optimally create `thisJoinPoint` and +`thisEnclosingJoinPoint` objects. The generated code that invokes these +now also uses the ability for the `LDC` bytecode instruction to load class constants directly (this replaces what was happening previously where -generated code referenced string classnames and classloading was being -done from the aspectj runtime as the woven application was starting). +generated code referenced string class names and class-loading was being +done from the AspectJ runtime as the woven application was starting). -This is turned on by using -Xajruntimetarget:1.9. This option was used +This is turned on by using `-Xajruntimetarget:1.9`. This option was used previously to enable users to target an old runtime if they knew that old runtime is all that was available at some deployed target. The new generation mechanism is not the default, not until it has had a bit more @@ -34,12 +34,12 @@ across other uses in the class file. more instructions involved in preparing the data for invocation of the new joinpoint factory methods. It is possible if you have a lot of joinpoints that we might blow the 64k instruction limit for the -ajc$preClinit method (where the factory invocation code is generated). +`ajc$preClinit` method (where the factory invocation code is generated). Please provide feedback if this happens to you! In anticipation of not all build plugins supporting that --Xajruntimetarget option, you can now specify these kinds of option in -the ASPECTJ_OPTS environment variable. Set that in your environment: +`-Xajruntimetarget` option, you can now specify these kinds of option in +the `ASPECTJ_OPTS` environment variable. Set that in your environment: [source, text] .... @@ -48,43 +48,43 @@ export ASPECTJ_OPTS="-Xajruntimetarget:1.9" And it should get picked up by AspectJ when it runs. -* 1.9.0 available 2-Apr-2018 - == AspectJ 1.9.0.RC4 -Primary changes in RC4 are to add support for in the Ant +_Release info: 1.9.0.RC4 available 21-Feb-2018_ + +Primary changes in RC4 are to add support for `` in the Ant task. This enables users of the Ant task to pass in options supported by the underlying AspectJ but not yet surfaced elsewhere. Particularly useful with Java9 which includes a number of module related commands. -For example, here is an iajc usage with compilerArg that is passing ---add-modules java.xml.bind: +For example, here is an `iajc` usage with `compilerArg` that is passing +`--add-modules java.xml.bind`: [source, xml] .... - - + showWeaveInfo="true" source="1.9" target="1.9" + debug="true" fork="true" maxmem="256m"> + + + - + + .... -1.9.0.RC4 available 21-Feb-2018 - == AspectJ 1.9.0.RC3 +_Release info: 1.9.0.RC3 available 5-Feb-2018_ + Primary changes in RC3 are to upgrade JDT and pickup all the fixes for Java9 that have gone into it over the last few months. -1.9.0.RC3 available 5-Feb-2018 - == AspectJ 1.9.0.RC2 -* 1.9.0.RC2 available 9-Nov-2017 +_Release info: 1.9.0.RC2 available 9-Nov-2017_ Key change in 1.9.0.RC2 is actually to be more tolerant of JDK10. The version handling has been somewhat overhauled so AspectJ 9 will behave @@ -93,7 +93,7 @@ place if new JDK versions are going to arrive thick and fast. == AspectJ 1.9.0.RC1 -* 1.9.0.RC1 available 20-Oct-2017 +_Release info: 1.9.0.RC1 available 20-Oct-2017_ This is the first release candidate of AspectJ 1.9.0 - the version of AspectJ to be based on Java9. It includes a recent version of the @@ -103,7 +103,7 @@ Eclipse Java9 compiler (from jdt core, commit #062ac5d7a6bf9). AspectJ can now be used with the new module system available in Java9. The key jars in AspectJ have been given automatic module names. The -automatic module name is org.aspectj.runtime for the aspectjrt module: +automatic module name is `org.aspectj.runtime` for the `aspectjrt` module: [source, text] .... @@ -112,8 +112,8 @@ $ java --module-path /lib/aspectjrt.jar --list-modules | grep aspectj org.aspectj.runtime file:////lib/aspectjrt.jar automatic .... -And similarly org.aspectj.weaver and org.aspectj.tools for aspectjweaver -and aspectjtools respectively: +And similarly `org.aspectj.weaver` and `org.aspectj.tools` for `aspectjweaver` +and `aspectjtools`, respectively: [source, text] .... @@ -133,43 +133,38 @@ contains org.aspectj.asm.internal ... .... - + - + - === Building woven modules -AspectJ understands module-info.java source files and building modules +AspectJ understands `module-info.java` source files and building modules that include aspects. Here is an example: [source, java] .... -module-info.java +// module-info.java module demo { - exports pkg; - requires org.aspectj.runtime; + exports pkg; + requires org.aspectj.runtime; } - -pkg/Demo.java +// pkg/Demo.java package pkg; public class Demo { - public static void main(String[] argv) { - System.out.println("Demo running"); - } + public static void main(String[] argv) { + System.out.println("Demo running"); + } } - -otherpkg/Azpect.java +// otherpkg/Azpect.java package otherpkg; public aspect Azpect { - before(): execution(* *(..)) && !within(Azpect) { - System.out.println("Azpect running"); - } + before(): execution(* *(..)) && !within(Azpect) { + System.out.println("Azpect running"); + } } .... @@ -184,8 +179,8 @@ module-info.java:3 [error] org.aspectj.runtime cannot be resolved to a module ... .... -Wait, that failed! Yes, aspectjrt.jar (which includes the required -org.aspectj.weaver module) wasn't supplied. We need to pass it on the +Wait, that failed! Yes, `aspectjrt.jar` (which includes the required +`org.aspectj.weaver` module) wasn't supplied. We need to pass it on the module-path: [source, text] @@ -205,13 +200,10 @@ Demo running That's it! - + - + - === Binary weaving with modules -A module is really just a jar with a module-info descriptor. As such you -can simply pass a module on the inpath and binary weave it with other +A module is really just a jar with a _module-info_ descriptor. As such, you +can simply pass a module on the _inpath_ and binary-weave it with other aspects. Take the module we built above, let's weave into it again: [source, java] @@ -221,9 +213,9 @@ aspects. Take the module we built above, let's weave into it again: package extra; public aspect AnotherAzpect { - before(): execution(* *(..)) && !within(*Azpect) { - System.out.println("AnotherAzpect running"); - } + before(): execution(* *(..)) && !within(*Azpect) { + System.out.println("AnotherAzpect running"); + } } .... @@ -232,13 +224,13 @@ public aspect AnotherAzpect { $ ajc -inpath demo.jar AnotherAzpect.java -outjar newdemo.jar .... -Notice how there was no complaint here that the org.aspectj.runtime +Notice how there was no complaint here that the `org.aspectj.runtime` module hadn't been passed in. That is because inpath was being used which doesn't treat specified jars as modules (and so does not check -dependencies). There is no module-inpath right now. +dependencies). There is no _module-inpath_ right now. -Because the new jar produced includes the compiled aspect, the -module-info specification inside is still correct, so we can run it +Because the new JAR produced includes the compiled aspect, the +_module-info_ specification inside is still correct, so we can run it exactly as before: [source, text] @@ -252,8 +244,8 @@ Demo running === Faster Spring AOP -Dave Syer recently created a series of benchmarks for checking the speed -of Spring-AspectJ: https://github.com/dsyer/spring-boot-aspectj +Dave Syer recently created a https://github.com/dsyer/spring-boot-aspectj[series of benchmarks] for checking the speed +of Spring-AspectJ. Here we can see the numbers for AspectJ 1.8.11 (on an older Macbook Pro): @@ -332,18 +324,18 @@ it impacts it by 1 second. * Eclipse JDT Java 9 support is still being actively worked on and lots of fixes will be coming through over the next few months and included in AspectJ 1.9.X revisions. -* AspectJ does not currently modify module-info.java files. An aspect + +* AspectJ does not currently modify `module-info.java` files. An aspect from one module applying to code in another module clearly introduces a dependency between those two modules. There is no reason - other than time! - that this can't be done. (https://bugs.eclipse.org/bugs/show_bug.cgi?id=526244[Issue 526244]) + * Related to that AspectJ, on detection of aspects should be able to -automatically introduce the requires org.aspectj.runtime to the -module-info. (https://bugs.eclipse.org/bugs/show_bug.cgi?id=526242[Issue +automatically introduce the `requires org.aspectj.runtime` to the +_module-info_. (https://bugs.eclipse.org/bugs/show_bug.cgi?id=526242[Issue 526242]) -* Module aware variants of AspectJ paths: --module-inpath, ---module-aspectpath. -(https://bugs.eclipse.org/bugs/show_bug.cgi?id=526243[Issue 526243]) - + - + +* Module-aware variants of AspectJ paths: `--module-inpath`, +`--module-aspectpath`. +(https://bugs.eclipse.org/bugs/show_bug.cgi?id=526243[Issue 526243]) diff --git a/docs/dist/doc/README-191.adoc b/docs/dist/doc/README-191.adoc index bba435893..e5aeac249 100644 --- a/docs/dist/doc/README-191.adoc +++ b/docs/dist/doc/README-191.adoc @@ -1,36 +1,31 @@ -[.small]#© Copyright 2018 Contributors. All rights reserved.# +== AspectJ 1.9.1 + +_© Copyright 2018 Contributors. All rights reserved._ The full list of resolved issues in 1.9.1 is available 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.1[here] -. - -== AspectJ 1.9.1 +_Release info: 1.9.1 available 20-Apr-2018_ === Java 10 support AspectJ has updated to a recent JDT compiler version (commit #abe06abe4ce1 - 9-Apr-2018). With this update it now supports Java10. -This means you can use the 'var' support. A simple example of combining +This means you can use the `var` support. A simple example of combining var with an aspect: [source, java] .... public class Code3 { - public static void main(String []argv) { - var x = "hello"; - System.out.println(x.getClass()); - } + public static void main(String []argv) { + var x = "hello"; + System.out.println(x.getClass()); + } } aspect X { - before(): call(* *.getClass()) && target(String) { - System.out.println(thisJoinPointStaticPart); - } + before(): call(* *.getClass()) && target(String) { + System.out.println(thisJoinPointStaticPart); + } } .... - -Available: 1.9.1 available 20-Apr-2018 - - + - + diff --git a/docs/dist/doc/README-192.adoc b/docs/dist/doc/README-192.adoc index 03f3e6c15..94da278bf 100644 --- a/docs/dist/doc/README-192.adoc +++ b/docs/dist/doc/README-192.adoc @@ -1,18 +1,13 @@ -[.small]#© Copyright 2018 Contributors. All rights reserved.# +== AspectJ 1.9.2 + +_© Copyright 2018 Contributors. All rights reserved._ The full list of resolved issues in 1.9.2 is available 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.2[here] -. - -== AspectJ 1.9.2 - === Java 11 support AspectJ now supports Java11. It has been updated to a more recent JDT compiler that supports Java 11 (JDTCore #6373b82afa49b). Available: 1.9.2 available Oct-2018 - - + - + diff --git a/docs/dist/doc/README-193.adoc b/docs/dist/doc/README-193.adoc index 22824b66b..aa130dbc5 100644 --- a/docs/dist/doc/README-193.adoc +++ b/docs/dist/doc/README-193.adoc @@ -1,51 +1,51 @@ -[.small]#© Copyright 2018 Contributors. All rights reserved.# +== AspectJ 1.9.3 + +_© Copyright 2018 Contributors. All rights reserved._ The full list of resolved issues in 1.9.3 is available 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.3[here] -. +_Release info: 1.9.3 available 4-Apr-2019_ AspectJ 1.9.3 supports Java12. Java12 introduces the new switch expression syntax, but you must activate support for that via an ---enable-preview flag when using the compiler and attempting to run the -resultant classes: Here is Switch3.java: +`--enable-preview` flag when using the compiler and attempting to run the +resultant classes: Here is `Switch3.java`: [source, java] .... -// =========8<========= public class Switch3 { - public static void main(String[] argv) { - System.out.println(one(Color.R)); - System.out.println(one(Color.G)); - System.out.println(one(Color.B)); - System.out.println(one(Color.Y)); - } - - public static int one(Color color) { - int result = switch(color) { - case R -> foo(0); - case G -> foo(1); - case B -> foo(2); - default -> foo(3); - }; - return result; - } - - public static final int foo(int i) { - return i+1; - } + public static void main(String[] argv) { + System.out.println(one(Color.R)); + System.out.println(one(Color.G)); + System.out.println(one(Color.B)); + System.out.println(one(Color.Y)); + } + + public static int one(Color color) { + int result = switch(color) { + case R -> foo(0); + case G -> foo(1); + case B -> foo(2); + default -> foo(3); + }; + return result; + } + + public static final int foo(int i) { + return i+1; + } } enum Color { - R, G, B, Y; + R, G, B, Y; } aspect X { - int around(): call(* foo(..)) { - return proceed()*3; - } + int around(): call(* foo(..)) { + return proceed()*3; + } } -// =========8<========= .... Compile it with: @@ -73,8 +73,3 @@ $ java --enable-preview Switch3 9 12 .... - -Available: 1.9.3.RC1 available 7-Mar-2019 - - + - + diff --git a/docs/dist/doc/README-194.adoc b/docs/dist/doc/README-194.adoc index 44d4e238d..72d6ca404 100644 --- a/docs/dist/doc/README-194.adoc +++ b/docs/dist/doc/README-194.adoc @@ -1,29 +1,25 @@ -[.small]#© Copyright 2019 Contributors. All rights reserved.# - == AspectJ 1.9.4 +_© Copyright 2019 Contributors. All rights reserved._ + The full list of resolved issues in 1.9.4 is available 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.4[here] -. +_Release info: 1.9.4 available 10-May-2019_ AspectJ 1.9.4 has a couple of important fixes in it: * Due to the new maven build process being used to build release -artifacts for the first time, there were errors in the aspectjweaver jar +artifacts for the first time, there were errors in the _aspectjweaver_ JAR that affected the ability to use it on the command line as an agent, this is now fixed. -* A number of users were noticing a ClassCastException problem, which I + +* A number of users were noticing a `ClassCastException` problem, which I believe was due to trying to run AspectJ on one level of the JDK whilst -targeting another. This can happen quite easily in eclipse if running +targeting another. This can happen quite easily in Eclipse if running your Eclipse on Java 8 but developing projects targeting Java 11. The class cast is because Java8 couldn't understand the packaging of system -classes post Java9 and so couldn't find java.lang.Object. This has now +classes post Java9 and so couldn't find `java.lang.Object`. This has now all been tidied up and should work much better. More details in https://bugs.eclipse.org/bugs/show_bug.cgi?id=546807[546807], thanks to Denys Khanzhyiev for some tips on getting to the right solution. - -Available: 1.9.4 available 10-May-2019 - - + - + diff --git a/docs/dist/doc/README-195.adoc b/docs/dist/doc/README-195.adoc index 36a157c53..662c561bc 100644 --- a/docs/dist/doc/README-195.adoc +++ b/docs/dist/doc/README-195.adoc @@ -1,23 +1,21 @@ -[.small]#© Copyright 2019 Contributors. All rights reserved.# - == AspectJ 1.9.5 +_© Copyright 2019 Contributors. All rights reserved._ + The full list of resolved issues in 1.9.5 is available 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.5[here] -. +_Release info: 1.9.5 available 28-Nov-2019_ AspectJ 1.9.5 supports Java13. Java13 introduces text blocks, but you -must activate support for that via an --enable-preview flag when using +must activate support for that via an `--enable-preview` flag when using the compiler and attempting to run the resultant classes: Here is -Code.java: +`Code.java`: [source, java] .... -// =======8<========= public class Code { - public static void main(String[] argv) { - } + public static void main(String[] argv) {} static aspect X { before(): execution(* Code.main(..)) { @@ -34,7 +32,6 @@ lines } } -// =========8<========= .... Compile it with: @@ -55,8 +52,3 @@ on multiple lines .... - -Available: 1.9.5 available 28-Nov-2019 - - + - + diff --git a/docs/dist/doc/README-196.adoc b/docs/dist/doc/README-196.adoc index 35e7ab2d3..0ecbc8967 100644 --- a/docs/dist/doc/README-196.adoc +++ b/docs/dist/doc/README-196.adoc @@ -1,23 +1,20 @@ -[.small]#© Copyright 2020 Contributors. All rights reserved.# - == AspectJ 1.9.6 +_© Copyright 2020 Contributors. All rights reserved._ + The full list of resolved issues in 1.9.6 is available 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.6[here] -. +_Release info: 1.9.6 available 22-Jul-2020_ AspectJ 1.9.6 supports Java14. Java14 introduces records, but you must -activate support for that via an --enable-preview flag when using the -compiler and attempting to run the resultant classes: Here is Code.java: +activate support for that via an `--enable-preview` flag when using the +compiler and attempting to run the resultant classes: Here is `Code.java`: [source, java] .... -// =======8<========= public record Person(String firstName, String lastName, int age) {} -// =======8<========= -// =======8<========= public class UsingPersonRecord { public static void main(String[] argv) { Person p = new Person("A","B",99); @@ -25,15 +22,12 @@ public class UsingPersonRecord { System.out.println(p.firstName()); } } -// =======8<========= -// =======8<========= public aspect TraceRecordComponents { before(): execution(public * *()) { System.out.println(thisJoinPointStaticPart); } } -// =======8<========= .... Compile it with: @@ -53,8 +47,3 @@ Person[firstName=A, lastName=B, age=99] execution(String Person.firstName()) A .... - -Available: 1.9.6 available 22-Jul-2020 - - + - + diff --git a/docs/dist/doc/README-197.adoc b/docs/dist/doc/README-197.adoc index 974891425..48c421d36 100644 --- a/docs/dist/doc/README-197.adoc +++ b/docs/dist/doc/README-197.adoc @@ -1,13 +1,15 @@ -[.small]#© Copyright 2021 Contributors. All rights reserved.# - == AspectJ 1.9.7 +_© Copyright 2021 Contributors. All rights reserved._ + +_Release info: 1.9.7 available 24-Jun-2021_ + AspectJ (binaries, source code, documentation) is now distributed under the https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt[Eclipse Public License v 2.0]. -Please note that going forward Bugzilla for issue management is -deprecated and new issues should be filed as +Please note, that going forward Bugzilla for issue management is +deprecated, and new issues should be filed as https://github.com/eclipse/org.aspectj/issues/new[GitHub issues]. The list of issues addressed for 1.9.7 can be found 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.7[here @@ -28,7 +30,7 @@ respective final and review features: * sealed classes (preview 15, preview 16) For features marked as preview on a given JDK, you need to compile with -ajc --enable-preview and run with java --enable-preview on that JDK. +`ajc --enable-preview` and run with `java --enable-preview on` that JDK. Please note that you cannot run code compiled with preview features on any other JDK than the one used for compilation. For example, records @@ -53,7 +55,7 @@ respective AspectJ version in which the features were first supported Please note that if you want to use load-time weaving on Java 16+, the weaving agent collides with https://openjdk.java.net/jeps/396[JEP 396 (Strongly Encapsulate JDK Internals by Default)]. Therefore, you need to -set the JVM parameter --add-opens java.base/java.lang=ALL-UNNAMED in +set the JVM parameter `--add-opens java.base/java.lang=ALL-UNNAMED` 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. @@ -89,11 +91,11 @@ to work on Linux or on Windows. * Remove legacy JRockit support. * Support Windows 10 and Windows Server 2016/2019 in installer. Those versions were not detected until now, which led to bogus Windows batch -files forwarding only 9 AJC parameters to the Java process via %1 %2 %3 -%4 %5 %6 %7 %8 %9 instead of %*. +files forwarding only 9 AJC parameters to the Java process via `%1 %2 %3 +%4 %5 %6 %7 %8 %9` instead of `%*`. * AJdoc (AspectJ's javadoc generator add-on for aspects) now supports the JDK 16 javadoc generator. -* Fix serialVersionUID initialization for Java 9+ +* Fix `serialVersionUID` initialization for Java 9+ * AJC (AspectJ Compiler) usage texts sometimes used to be printed twice and they were printed too often, e.g. on top of every compile error. This has been fixed. Furthermore, the partly outdated usage text is now @@ -105,5 +107,3 @@ regard to what is included (ASM, JDT Core) and how package names have been relocated. * Fix sample code formatting issues (indentation) throughout the documentation. - -Available: 1.9.7 available 24-Jun-2021 diff --git a/docs/dist/doc/changes.adoc b/docs/dist/doc/changes.adoc index 25ef37f09..11ff5bfa6 100644 --- a/docs/dist/doc/changes.adoc +++ b/docs/dist/doc/changes.adoc @@ -1,8 +1,8 @@ -[.small]#© Copyright 1998-2002 Palo Alto Research Center Incorporated -2003-2008 Contributors. All rights reserved.# - == Changes in AspectJ +_© Copyright 1998-2002 Palo Alto Research Center Incorporated +2003-2008 Contributors. All rights reserved._ + * xref:#_1_6_0[1.6.0] (released 2008-04) * xref:#_1_5_4[1.5.4] (released 2007-12) * xref:#_1_5_3[1.5.3] (released 2006-11) @@ -1097,8 +1097,12 @@ is limited. ** ... * Limitations: ** AJBrowser is currently an undocumented demonstration application. To -use it type: + -> ajbrowser ... +use it type: ++ +[source, text] +.... +ajbrowser ... +.... === Emacs Support: aspectj-mode and AJDEE @@ -1193,8 +1197,12 @@ is limited. ** Build configuration file editor added. * Limitations: ** AJBrowser is currently an undocumented demonstration application. To -use it type: + -> ajbrowser ... +use it type: ++ +[source, text] +.... +ajbrowser ... +.... === Aspectj-mode and AJDEE: AspectJ support in Emacs diff --git a/docs/dist/doc/porting.adoc b/docs/dist/doc/porting.adoc index cbf8ede6d..0bda1cf3b 100644 --- a/docs/dist/doc/porting.adoc +++ b/docs/dist/doc/porting.adoc @@ -1,8 +1,8 @@ -[.small]#© Copyright 1998-2002 Palo Alto Research Center Incorporated, -2003-2004 Contributors. All rights reserved.# - == AspectJ Porting Notes +_© Copyright 1998-2002 Palo Alto Research Center Incorporated, +2003-2004 Contributors. All rights reserved._ + * xref:#pre-1_2[Pre-1.2 code] * xref:#pre-1_1[Pre-1.1 code] * xref:#pre-1_0_4[Pre-1.0.4 code] @@ -366,19 +366,11 @@ crosscutting] One of the most pervasive changes in porting code written before 1.0alpha1 is the change in some of the pointcut names from plural to singular, that is, they lose an "s". In one sense, making this change in -your programs is easy: just go through and whever you see uses of the -pointcuts - -____ -calls executions gets sets handlers initializations -staticinitializations -____ +your programs is easy: Just go through and whever you see uses of the +pointcuts `calls, executions, gets, sets, handlers, initializations, +staticinitializations`. -Just take off the final "s", to make one of - -____ -call execution get set handler initialization staticinitialization -____ +Just take off the final "s", to make one of `call, execution, get, set, handler, initialization, staticinitialization`. Often, there will be other changes you should make for each of these pointcuts, but as for the name, just take off the "s". @@ -487,12 +479,12 @@ allows caching constructed objects [source, java] .... aspect Singleton { - private C theC = null; + private C theC = null; - C around(): call(C.new(..)) { - if (c == null) theC = proceed(); - return theC; - } + C around(): call(C.new(..)) { + if (c == null) theC = proceed(); + return theC; + } } .... @@ -512,12 +504,7 @@ after() returning (Point p): call(Point+.new(int, int)) { ... } In previous versions of AspectJ, state such as the currently executing object or a particular argument of a method call could be accessed from the signatures of many pointcuts, leading to difficult-to-read forms. In -AspectJ 1.0, all state accesses now use only three pointcuts - -____ -args this target -____ - +AspectJ 1.0, all state accesses now use only three pointcuts `args, this, target` which pick out argument values, the currently executing object, and the target object of a method call or field operation, respectively. @@ -601,17 +588,18 @@ the circularity. [source, java] .... aspect A { - before(Frame f, Color c): gets(Color f.color)[c] { ... } + before(Frame f, Color c): gets(Color f.color)[c] { ... } } // ==> aspect A { - before(Frame f): - target(f) && get(Color Frame.color) && !within(A) { - Color c = f.color; - ... - } + before(Frame f): + target(f) && get(Color Frame.color) && !within(A) + { + Color c = f.color; + // ... + } } .... @@ -621,18 +609,19 @@ after advice that needs the old value is to convert it to around advice. [source, java] .... aspect A { - after(Frame f, Color c) returning (): gets(Color f.color)[c] { ... } + after(Frame f, Color c) returning (): gets(Color f.color)[c] { ... } } // ==> aspect A { - void around(Frame f): - target(f) && get(Color Frame.color) && !within(A) { - Color c = f.color; - proceed(f); - ... - } + void around(Frame f): + target(f) && get(Color Frame.color) && !within(A) + { + Color c = f.color; + proceed(f); + // ... + } } .... @@ -731,10 +720,12 @@ converted to `target` (and `receptions` converted to `call`). So, [source, java] .... pointcut stateChanges(Subject s): - instanceof(s) && receptions(void Button.click()); + instanceof(s) && receptions(void Button.click()); + // ==> + pointcut stateChange(Subject s): - target(s) && call(void Button.click()); + target(s) && call(void Button.click()); .... In all other cases, `instanceof` referred to the currently executing @@ -827,12 +818,12 @@ body of the advice. For example, if the aspect A were defined [source, java] .... before(A myA): hasaspect(myA) { - myA.checkStatus(); + myA.checkStatus(); } // ==> before(): if(A.hasAspect()) { - A myA = A.aspectOf(); - myA.checkStatus(); + A myA = A.aspectOf(); + myA.checkStatus(); } .... @@ -841,7 +832,7 @@ before(): if(A.hasAspect()) { The withinall poinctut is no longer defined. You can use a combination of within and the xref:#_1_0a1-subtypes-to-plus[new subtypes operator], -+, instead. You'll save two characters and be using a simpler and more +`+`, instead. You'll save two characters and be using a simpler and more orthogonal language. [source, java] @@ -931,11 +922,11 @@ in `TypePattern`. [source, java] .... public void (subtypes(Target0 || Target1)).accept(Visitor v) { - v.visit(this); + v.visit(this); } // ==> public void (Target0+ || Target1+).accept(Visitor v) { - v.visit(this); + v.visit(this); } .... @@ -964,13 +955,13 @@ Around advice must now declare the checked exceptions it throws with a [source, java] .... char around(char c) throws java.io.CharConversionException: converter(c) { - char result; - try { result = proceed(); } - catch (Exception e) { - throw new java.io.CharConversionException(); - } - if (result == 0) throw new java.io.CharConversionException(); - return result; + char result; + try { result = proceed(); } + catch (Exception e) { + throw new java.io.CharConversionException(); + } + if (result == 0) throw new java.io.CharConversionException(); + return result; } .... @@ -1003,12 +994,12 @@ the `before` advice [source, java] .... aspect A { - before(): call(void main(..)) { - throw new RuntimeException(); - } - after() throwing(RuntimeException e): call(void main(..)) { - System.err.println("caught you!"); - } + before(): call(void main(..)) { + throw new RuntimeException(); + } + after() throwing(RuntimeException e): call(void main(..)) { + System.err.println("caught you!"); + } } .... @@ -1018,12 +1009,12 @@ making its exception uncatchable by the `after throwing` advice [source, java] .... aspect A { - after() throwing(RuntimeException e): call(void main(..)) { - System.err.println("missed you!"); - } - before(): call(void main(..)) { - throw new RuntimeException(); - } + after() throwing(RuntimeException e): call(void main(..)) { + System.err.println("missed you!"); + } + before(): call(void main(..)) { + throw new RuntimeException(); + } } .... @@ -1069,10 +1060,10 @@ was [source, java] .... before() executions(* myMethod()) { - ExecutionJoinPoint jp = (ExecutionJoinPoint)thisJoinPoint; - CodeSignature jp = (CodeSignature)jp.getSignature(); - System.err.println(jp.getParameters()); - System.err.println(jp.getParameterNames()); + ExecutionJoinPoint jp = (ExecutionJoinPoint)thisJoinPoint; + CodeSignature jp = (CodeSignature)jp.getSignature(); + System.err.println(jp.getParameters()); + System.err.println(jp.getParameterNames()); } .... @@ -1082,10 +1073,10 @@ While there is still a rich hierarchy for signatures, there is only one [source, java] .... before() executions(* myMethod()) { - JoinPoint jp = thisJoinPoint; - CodeSignature jp = (CodeSignature)jp.getSignature(); - System.err.println(jp.getArgs()); - System.err.println(jp.getParameterNames()); + JoinPoint jp = thisJoinPoint; + CodeSignature jp = (CodeSignature)jp.getSignature(); + System.err.println(jp.getArgs()); + System.err.println(jp.getParameterNames()); } .... @@ -1103,14 +1094,14 @@ AspectJ uses the `declare` form for exactly the same functionality. [source, java] .... Point +implements Serializable; -=> +// ==> declare parents: Point implements Serializable; .... [source, java] .... MyButton +extends ButtonAdaptor; -=> +// ==> declare parents: MyButton extends ButtonAdaptor; .... @@ -1123,26 +1114,27 @@ Java. This means that the following code previously compiled: [source, java] .... class C { - void noExceptionDeclared() { - exceptionDeclared(); - } - void exceptionDeclared() throws IOException {} + void noExceptionDeclared() { + exceptionDeclared(); + } + void exceptionDeclared() throws IOException {} } + aspect A { - around(): call(void C.exceptionDeclared()) { - try { proceed(); } - catch (IOException e) {} - } + around(): call(void C.exceptionDeclared()) { + try { proceed(); } + catch (IOException e) {} + } } .... -even though the class C is not compilable on its own (because -noExceptionDeclared actually throws an Exception). +even though the class `C` is not compilable on its own (because +`noExceptionDeclared` actually throws an `Exception`). AspectJ now firmly places everything that affects the type system of Java, including the declared-exception checking system, into the space of introduction and declare. So, in order to state that the call to -exceptionDeclared() will not, actually, throw an exception, we now +`exceptionDeclared()` will not, actually, throw an exception, we now "soften" that exception, that is, take it out of the space of declared exceptions. @@ -1159,8 +1151,8 @@ needed: [source, java] .... declare soft: IOException: - call(void C.exceptionDeclared()) && - withincode(void noExceptionDeclared()); + call(void C.exceptionDeclared()) && + withincode(void noExceptionDeclared()); .... [[_1_0a1-aspects]] @@ -1200,16 +1192,23 @@ If you use a pointcut that picked out reception join points, then use [source, java] .... aspect Shadow - of eachobject(receptions(void Point.setX(int)) || - receptions(void Point.setY(int))) { - ... + of eachobject( + receptions(void Point.setX(int)) || + receptions(void Point.setY(int)) + ) +{ + // ... } // ==> -aspect Shadow pertarget(call(void Point.setX(int)) || - call(void Point.setY(int))) { - ... +aspect Shadow + pertarget( + call(void Point.setX(int)) || + call(void Point.setY(int)) + ) +{ + // ... } .... @@ -1300,7 +1299,7 @@ any abstract pointcuts. Thus the following extension: [source, java] ---- abstract aspect A { - abstract pointcut pc(); + abstract pointcut pc(); } aspect B {} @@ -1320,11 +1319,11 @@ in the declaration of the concrete aspect fixes this problem. [source, java] ---- abstract aspect A { - abstract pointcut pc(); + abstract pointcut pc(); } aspect B { - pointcut pc(); + pointcut pc(); } ---- @@ -1337,13 +1336,13 @@ advice to join points within its own advice body. So, for example, in [source, java] ---- class C { - static int i; + static int i; } aspect A { - before(): gets(int C.i) { - System.err.println("C.i was " + C.i) - } + before(): gets(int C.i) { + System.err.println("C.i was " + C.i) + } } ---- @@ -1360,13 +1359,13 @@ trace _all_ references of `C.i`, just those outside the aspect. [source, java] ---- class C { - static int i; + static int i; } aspect A { - before(): get(int C.i) && ! within(A) { - System.err.println("C.i was " + C.i) - } + before(): get(int C.i) && ! within(A) { + System.err.println("C.i was " + C.i) + } } ---- @@ -1378,22 +1377,24 @@ away from that method (and away from calls to that method): [source, java] ---- class C { - static int i; + static int i; } aspect A { - public static int getCi() { - return C.i; // will be traced - } - - before(): get(int C.i) && - ! withincode(void A.traceCi()) - ! call(void A.traceCi()) { - traceCi(); - } - private void traceCi() { - System.err.println("C.i was " + C.i) // will not be traced - } + public static int getCi() { + return C.i; // will be traced + } + + before(): get(int C.i) && + ! withincode(void A.traceCi()) && + ! call(void A.traceCi()) + { + traceCi(); + } + + private void traceCi() { + System.err.println("C.i was " + C.i) // will not be traced + } } ---- @@ -1421,7 +1422,7 @@ require some simple editing. Anywhere you have an introduction block [source, java] ---- introduction GTN { - // ... + // ... } ---- @@ -1436,9 +1437,9 @@ identifier. [source, java] ---- introduction Foo { - public void doStuff() { this.doStuffLater(); } - public int calorieCount = 3; - public new(int x) { super(); calorieCount = x; } + public void doStuff() { this.doStuffLater(); } + public int calorieCount = 3; + public new(int x) { super(); calorieCount = x; } } // ==> @@ -1455,8 +1456,8 @@ new identifiers `implements` or `extends`, and place that in a [source, java] ---- introduction Foo { - implements Comparable; - extends Goo; + implements Comparable; + extends Goo; } // ==> @@ -1472,7 +1473,7 @@ be parenthesized. [source, java] ---- introduction subtypes(Foo) && !Goo { - int x; + int x; } // ==> @@ -1491,20 +1492,20 @@ introduction. [source, java] ---- class Counter { - private int count = 2; + private int count = 2; } aspect ExposeCountersPrivates { - introduction Counter { - public int getCount() { return count; } - } + introduction Counter { + public int getCount() { return count; } + } } // ==> // in 0.8, only privileged aspects can expose a class's privates privileged aspect ExposeCountersPrivates { - public int Counter.getCount() { return count; } + public int Counter.getCount() { return count; } } ---- @@ -1514,21 +1515,20 @@ privates can be improved by using private introduction instead. [source, java] ---- -class C { -} +class C {} aspect AddCounter { - introduction C { - private int count; - public int getCount() { return count; } - } + introduction C { + private int count; + public int getCount() { return count; } + } } // ==> aspect AddCounter { - private int Counter.count; - public int Counter.getCount() { return count; } + private int Counter.count; + public int Counter.getCount() { return count; } } ---- @@ -1561,17 +1561,17 @@ and make sure the aspect is not defined with the "abstract" modifier. [source, java] ---- aspect Tracing { - static before(): executions(* *(..)) { - System.out.println("Got Here! " + thisJoinPoint); - } + static before(): executions(* *(..)) { + System.out.println("Got Here! " + thisJoinPoint); + } } // ==> aspect Tracing { - before(): execution(* *(..)) { - System.out.println("Got Here! " + thisJoinPoint); - } + before(): execution(* *(..)) { + System.out.println("Got Here! " + thisJoinPoint); + } } ---- @@ -1583,29 +1583,29 @@ put it in a new aspect, possibly even an inner aspect. [source, java] ---- aspect ComplexTracing of eachobject(cflow(executions(void Main.main(..)))) { - static before(): executions(* *(..)) { - System.out.println("Got Here! " + thisJoinPoint); - } - static after(): executions(* *(..)) { - System.out.println("Returned! " + thisJoinPoint); - } - - // some other dynamic advice, fields, etc + static before(): executions(* *(..)) { + System.out.println("Got Here! " + thisJoinPoint); + } + static after(): executions(* *(..)) { + System.out.println("Returned! " + thisJoinPoint); + } + + // some other dynamic advice, fields, etc } // ==> aspect ComplexTracing of eachobject(cflow(executions(void Main.main(..)))) { - static aspect AlwaysTracing { - before(): execution(* *(..)) { - System.out.println("Got Here! " + thisJoinPoint); - } - after(): execution(* *(..)) { - System.out.println("Returned! " + thisJoinPoint); - } + static aspect AlwaysTracing { + before(): execution(* *(..)) { + System.out.println("Got Here! " + thisJoinPoint); + } + after(): execution(* *(..)) { + System.out.println("Returned! " + thisJoinPoint); } + } - // some other dynamic advice, fields, etc + // some other dynamic advice, fields, etc } ---- @@ -1621,17 +1621,17 @@ implicitly abstract. [source, java] ---- aspect BaseTracing { - abstract pointcut traced(); - before(): traced() { - System.out.println("Got Here! " + thisJoinPoint); - } + abstract pointcut traced(); + before(): traced() { + System.out.println("Got Here! " + thisJoinPoint); + } } // ==> // make this abstract aspect explicitly abstract abstract aspect BaseTracing { - // ... + // ... } ---- @@ -1682,15 +1682,15 @@ each point with a `PropertyChangeSupport` object. ---- aspect BoundPoint of eachobject(instanceof(Point)) { - java.beans.PropertyChangeSupport support = null; + java.beans.PropertyChangeSupport support = null; - after() returning(Point p): receptions(p.new(..)){ - support = new PropertyChangeSupport(myPoint); - } + after() returning(Point p): receptions(p.new(..)){ + support = new PropertyChangeSupport(myPoint); + } - around(Point p) returns void: receptions(void p.set*(*)) { - // code that uses support - } + around(Point p) returns void: receptions(void p.set*(*)) { + // code that uses support + } } ---- @@ -1702,11 +1702,11 @@ of creating an aspect instance for every `Point` object, store the [source, java] ---- aspect BoundPoint { - private PropertyChangeSupport Point.support = new PropertyChangeSupport(this); + private PropertyChangeSupport Point.support = new PropertyChangeSupport(this); - void around(Point p): setters(p) { - // code that uses p.support - } + void around(Point p): setters(p) { + // code that uses p.support + } } ---- @@ -1741,39 +1741,35 @@ different cases depending on what the original pointcut did. For pointcuts denoting calls to particular static methods, such as -____ +[source, java] .... calls(String, static String valueOf(int)) // deprecated .... -____ the transformation is easy. Simply make the desired signature explicit. Instead of catching all calls to any static method that happens to have the signature `String valueOf(int)`, catch calls to that exact method defined in the String class. -____ +[source, java] .... call(static String String.valueOf(int)) .... -____ Pointcuts denoting calls to classes of static methods can also be rewritten with these rules. For example, -____ +[source, java] .... calls(my.package.*, static * get*(..)) // deprecated .... -____ should now be written -____ +[source, java] .... call(static * my.package.*.get*(..)) .... -____ ===== Calls to non-static methods @@ -1781,21 +1777,19 @@ Many pointcuts denoting calls to non-static methods can be fixed the same way that those pointcuts denoting calls to static methods are fixed. So, -____ +[source, java] .... calls(Thread, int getPriority()) // deprecated .... -____ which denotes all calls to nullary int methods named `getPriority` when the called object is an instance of the `Thread` type, can almost always be rewritten -____ +[source, java] .... call(int Thread.getPriority()) .... -____ which denotes all calls to the nullary int `Thread.getPriority()` method. @@ -1809,11 +1803,10 @@ method is called. If you want to capture calls to the `int Thread.getPriority()` method, regardless of how the called object is statically typed, you shoud use the different translation: -____ +[source, java] .... call(int getPriority()) && target(Thread) .... -____ This will capture all call join points of methods with signature `int Thread.getPriority()`. @@ -1827,38 +1820,35 @@ It will also denote any join points if the Thread type does not define The simplest way to remove an advice declaration from a class is to simply define the advice declaration in an inner aspect. So, instead of -____ +[source, java] .... class C { - static before(): executions(C.new()) { ... } // deprecated + static before(): executions(C.new()) { /*...*/ } // deprecated } .... -____ write -____ +[source, java] .... class C { - static aspect ConstructionProtocol { - static before(): executions(C.new()) { ... } - } + static aspect ConstructionProtocol { + static before(): executions(C.new()) { /*...*/ } + } } .... -____ If your advice doesn't refer to any inner classes or interfaces of C, you can move the inner aspect out of the class entirely. -____ +[source, java] .... -class C { ... } +class C { /*...*/ } aspect ConstructionProtocol { - static before(): execution(C.new()) { ... } + static before(): execution(C.new()) { /*...*/ } } .... -____ Your code will be clearer if you consider the purpose of each piece of advice when you make this change. It may be that some of the advice @@ -1891,21 +1881,23 @@ represent the join point object. The elimination of the `runNext()` static method requires almost no porting work. An automatic replacement of the string -____ -`thisJoinPoint.runNext` -____ +[source, java] +.... +thisJoinPoint.runNext +.... with the string -____ -`proceed` -____ +[source, java] +.... +proceed +.... will do the job. However, if any around advice used the identifier -"`proceed`" as a formal parameter or local variable, it must be renamed, +`proceed` as a formal parameter or local variable, it must be renamed, and if any aspect used it as a field, then references to the field in around advice should be made explicit (prefixing the reference with the -aspect name or "`this`", depending on whether the field is static or +aspect name or `this`, depending on whether the field is static or not). [[thisJoinPoint]] @@ -1928,33 +1920,19 @@ one of: For example: -____ -.... -System.out.println(thisJoinPoint.className + "." + - thisJoinPoint.methodName) -.... -____ +* `System.out.println(thisJoinPoint.className + "." + thisJoinPoint.methodName)` can be replaced with -____ -`System.out.println(thisJoinPoint)` -____ - -or - -____ -`System.out.println(thisJoinPoint.getSignature().toShortString())` -____ +* `System.out.println(thisJoinPoint)` or +* `System.out.println(thisJoinPoint.getSignature().toShortString())` with comparable behavior. Accesses to the parameters field of join points should be changed as follows. A field access like: -____ -`thisJoinPoint.parameters` -____ +* `thisJoinPoint.parameters` must be changed to: -- 2.39.5