© Copyright 1998-2002 Palo Alto Research Center Incorporated 2003-2004 Contributors. All rights reserved.

Changes in AspectJ


1.2.1

All known P1 and P2 bugs have been fixed in this release. The full list of fixes and enhancements can be found on bugzilla. Some of the more significant bug fixes and enhancements include:

1.2

All known P1 and P2 bugs have been fixed in this release. The full list of fixes and enhancements can be found on bugzilla. Some of the more significant bug fixes and enhancements include:

1.1.1

All known P1 and P2 bugs have been fixed in this release. The full list of bug fixes (49 in all) can be found on bugzilla.

Some of the more significant bug fixes and enhancements in this release include:

1.0.6

This release contains mainly bug fixes for ajde and ajdoc.

Compiler

We fixed a bug with switch statements, thanks largely to Jason Rimmer's diligence in helping us isolate the problem. Also, to help Log4J parse stack traces, we changed class file symbolic line references to use [] instead of () for the virtual start lines of each file.

AJDE

AJDE Framework, AJBrowser, and AJDE for Forte/NetBeans

The memory use of the structure model has been streamlined in order to reduce footprint when working with large systems.  Error tolerance has also been improved for dealing with a structure model that is out of synch with resources on disk.

AJDE for JBuilder

JBuilder 7 is now supported.  All known bugs have been fixed including:

In addition, thanks to user feedback that indicated trouble building JBuilder OpenTools with AJDE/JBuilder, the OpenTool is now being built with itself.

Ajdoc


1.0.5

This release includes significant improvements to AspectJ Development Environment (AJDE) support. The entire user interface has been revised and streamlined. The AJDE features are more tightly integrated into JBuilder and NetBeans/Forte support. JBuilder support now includes graphical configuration file editing and an integrated AspectJ Browser tool.

Compiler

This was another compiler release primarily concerned with fixing corner cases in the language implementation. Our handling of nested classes, the assert statement, and cflow were the principal offenders this time. Thanks to Nicholas Alex Leidenfrost and Patrick Chan for their clear and concise bug reports on some of these issues.

AJDE

This release includes significant improvements to AspectJ Development Environment (AJDE) support. All known bugs have been fixed, and the core framework quality has been significantly increased thanks to the adoption of a unit test suite. The following changes apply to all of the AJDE NetBeans/Forte, JBuilder, and the AspectJ Browser support. NetBeans/Forte and JBuilder-specific changes are listed below.

AJDE for JBuilder

Integration into the JBuilder IDE is more streamlined. In addition:

AJDE for Forte/NetBeans

Integration into the NetBeans IDE is more streamlined. In addition:

AJBrowser

Ajdoc

Bug fixes:

Ant tasks

Bug fixes:


1.0.4

Compiler

Incompatible changes

Two potentially surprising incompatible changes have been made to ajc in order to bring the compiler into compliance with the 1.0 language design. These changes will be signalled by clear warning or error messages at compile-time and will not cause any run-time surprises. We expect most users to never notice these changes.

AJDE

This is the first release of AJDE support with significant external contribution. A big thanks goes out to Phil Sager for porting the AJDE for Forte/NetBeans support to NetBeans 3.3.1 and improving the integration into NetBeans.

AJDE for JBuilder

AJDE for Forte/NetBeans

AJDE for Emacs

Ajdoc

Ajdoc now runs under J2SE 1.4, but still requires the tools.jar from J2SE 1.3 be on the classpath.

Ant tasks

Documentation

Added a 1-page quick reference guide. Improved javadoc documentation for the org.aspectj.lang package.


1.0.3

Compiler

This release fixes a single significant bug in 1.0.2 where ajc could generate unreachable code in -usejavac or -preprocess mode. This would happen when around advice was placed on void methods whose body consisted solely of a while (true) {} loop. We now properly handle the flow-analysis for this case and generate code that is acceptable to javac. Thanks to Rich Price for reporting this bug.

Ant taskdefs

Added support to the Ajc taskdef for the -source 1.4 and -X options generally.


1.0.2

This release is mainly about keeping up with the Joneses. To keep up with SUN's release candidate for J2SE1.4, we now officially support the new 1.4 assertions and running on the 1.4 VM. In honor of the public review of JSR-45 Debugging Support for Other Languages we implement this spec for AspectJ. We support Borland's recent release of JBuilder 6, and since some of our users are starting to work on Mac OSX, AJDE now works nicely on this platform. We also fixed almost all of the bugs you reported in 1.0.1.

Compiler

AJDE

This is a bug fix release only.

AJDE for JBuilder

AJDE for Forte

AJDB

Some minor bug fixes, but this is still early-access software. Please try using another JPDA-compliant debugger. If it uses JDI correctly, then it should navigate to line numbers when the classes are run under J2SE1.4, based on the new JSR-45 debugging support described above. We would appreciate any reports of success or failure.


1.0.1

Compiler

This release fixes a significant performance issue in the compiler, reported by Rich Price, that could lead to extremely long compiles in systems with many aspects and classes. Several other small bugs related to reporting compilation errors have also been fixed, see this bug report for an example.

A new experimental flag has been added, -XaddSafePrefix, that will cause the prefix aspectj$ to be inserted in front of all methods generated by ajc. This mode should be helpful when using aspectj with tools that do reflection based on method names, such as EJB tools. Thanks to Vincent Massol for pointing out the importance of this. It is expected that this prefix will either become the default compiler behavior in the future or a non-experimental flag will replace it.

AJDE

Minor bug fixes, including: AJDE for JBuilder failed to preserve application parameters from project settings when executing the application.

Source builds were cleaned up for JBuilder and Forte sources.

AJDB

Two bugs were reported and have been fixed in this release. (Note that ajdb is still considered early-access software.)

1.0.0

Language

There were no language changes for this release.

Compiler

Several minor bugs primarily in error handling were reported and have been fixed in this release. The two most serious bugs are described below:

AJDE

Numerous user interface refinements were made to the browser and core AJDE functionality. Error handling and reporting has been improved. All of the AJDE tools now support the ".aj" file extension.

AJDE for JBuilder

AJDE for Forte

AJBrowser

Emacs Support: aspectj-mode and AJDEE

AJDoc

Ant taskdefs

1.0rc3

Language

There have been several minor clarifications/changes to the language.

Compiler

This release saw several changes to the compiler in order to work-around known bugs in different JVMs, or to otherwise mimic the behavior of javac rather than necessarily following the Java Language Specification.

AJDE

AJDE for JBuilder

AJDE for Forte

AJBrowser

Emacs Support: aspectj-mode and AJDEE

AJDoc

Some of the more obvious NullPointerException bugs in Ajdoc were fixed, but Ajdoc does not implement all the functionality of Javadoc and has some bugs:

Further, Ajdoc has not been testing on variants of the J2SE (it uses javadoc classes).

Ant taskdefs

The Ajc taskdef was updated to support the new compiler options and the .aj extension, and some NullPointerException bugs were fixed (thanks to Vincent Massol for a bug report listing the line number of the fix). The AJDoc cannot be run repeatedly in a single Ant run, and has trouble loading the doclet unless the libraries are installed in ${ant.home}/lib.


1.0rc2

Language

There are no language changes in this release. This is a bug fix release only.

Compiler

A bug in handling inner type names that conflict with enclosing type names was fixed. Many error messages were improved.

AJDE

AJDE for JBuilder

AJDE for Forte

AJBrowser

Emacs Support: aspectj-mode and AJDEE

This release now properly displays annotations for call sites and introductions. Robustness has been improved in several dimensions, including performance at startup. The compile menu now recomputes properly when changing directories.


1.0rc1

Language

Some of the details of the specification for perthis and pertarget have changed. These changes make these language constructs implementable on current JVMs without memory leaks (this wasn't true of the previous version). Most people will probably not notice these changes, but the correct semantics are described in the semantics section of the programming guide.

In a related change, aspects are not allowed to implement either the java.io.Serializable or the java.lang.Cloneable interface. It is unclear what the correct behavior of a system should be when an aspect is serialized or cloned, and rather than make an arbitrary choice right now we've chosen to leave the most room to design them right in a future release.

Compiler

ajc now directly generates .class files without using javac as a back-end. This should result in improved compiler performance, better error messages and better stack-traces and debugging info in those .class files. -preprocess mode is still available for those who want to generate legal Java source code and a new -usejavac mode is available if you have a requirement to continue to use javac as a back-end.

ajc now officially supports source files with the .aj extension. We plan to extend this support to the rest of our tools as time permits.

This release of ajc includes support for the "-source 1.4" option that enables the new 'assert' keyword in jdk1.4. This option only works correctly when compiling against the jdk1.4 libraries. In addition, this release of ajc will run under SUN's jdk1.4beta2. However, we still strongly recommend that most users use the non-beta jdk1.3.

AJDE

AJDE for JBuilder

AJDE for Forte

AJBrowser

Aspectj-mode and AJDEE: AspectJ support in Emacs

This release of AspectJ support for Emacs includes corrections to the documentation and the appearance of annotations and jumps in the editing view. Also, advice are now shown on non-declarations, when appropriate, such as call advice. The internal event model has been revised to reduce computational overhead.


1.0beta1

Language

There is one language change since 1.0alpha1. The static modifier is no longer needed or allowed on pointcut declarations. Name binding for pointcut declarations works like class methods now. Thanks to Robin Green for encouraging us to look at this one last time.

The current implementation of perthis/pertarget has the possibility of memory leaks (thanks to Arno Schmidmeier for pointing this out). The design of this part of the language will almost certainly see some changes in the next release to address issues of implementability on the JVM as well as related issues.

Compiler

The ajc compiler should now catch all errors in source code and you should no longer see errors coming from files in 'ajworkingdir'. Please report any errors in 'ajworkingdir' as bugs.

All reported bugs in 1.0alpha1 have been fixed. Thanks to everyone for your bug reports. Most notably, the 'if' pcd that was added in 1.0alpha1 should work correctly in this release. Thanks to Morgan Deters for a very thorough bug report on this broken feature days after the 1.0alpha1 release.

AJBrowser

AJDE

AJDE for JBuilder

AJDE for Forte

Aspectj-mode and AJDEE: AspectJ support in Emacs

AspectJ Development Environment for Emacs has been split into two pieces, aspectj-mode (an extension of java-mode), and AJDEE (an extension of JDE). Additionally, a switch, -emacssym, has been added to ajc that generates AspectJ declarations information directly, thus beanshell is no longer required for use of these modes.


1.0alpha1

This is the first alpha release of the 1.0 language and tools. There have been many changes in the language, and many improvements to the tools. We wish to thank our users for putting up with the high volatility of AspectJ in the push to 1.0.

Language

There have been many changes to make the 1.0 language both simpler and more powerful. User feedback has driven most of these design changes. Each email we've received either making a suggestion or just asking a question about a confusing part of the language has played a part in shaping this design. We'd like to thank all of our users for their contributions.

While we don't have room to thank all of our users by name, we'd like to specifically mention a few people for their high-quality sustained contributions to the users@aspectj.org mailing list as well as through their feature requests and bug reports. Robin Green (who'll be very happy to see declare error), Stefan Hanenberg (who should appreciate the '+' wildcard in type patterns), and Rich Price (who suggested final pointcuts, more flexible dominates, and many other improvements).

Note that entries into the porting notes for this release are linked from the various language changes.

Pointcuts

Perhaps the least interesting -- but most pervasive -- change is that the names of the single-kinded pointcut designators (the ones that pick out only one kind of join point)

calls executions gets sets handlers initializations staticinitializations

have been changed to be singular rather than plural nouns

call execution get set handler initialization staticinitialization

Although a side benefit is that the names are one character shorter, the real benefit is that their combination with the && and || operators now reads much more naturally. No longer does "and" mean "or" and "or" mean "and".

You'll notice that receptions doesn't appear on the table as being shortened to reception. That's because call and reception join points have been merged, and the receptions pointcut declaration has been eliminated. Now, call join points describe the action of making a call, including both the caller and callee. Eliminating reception join points makes AspectJ much simpler to understand (reception join points were a commonly misunderstood feature) without giving up expressive power.

We have changed the mechanism for accessing state at join points, which has the benefit of making our treatment of signatures cleaner and easier to read. As a part of this, the instanceof pointcut designator has now been split into two different pointcut designators, this and target, corresponding to a join point's currently executing object and target object, respectively.

The new args pointcut adds expressive power to the language by allowing you to capture join points based on the actual type of an argument, rather than the declared type of its formal. So even though the HashSet.removeAll method takes a Collection as an argument, you can write advice that only runs when it is actually passed a HashSet object.

AspectJ's notion of object construction and initialization, a complicated process in Java, has been clarified. This affects some uses of the initializations pointcut and constructor calls pointcut.

The little-used pointcuts hasaspect and withinall have been removed.

The returns keyword is no longer necessary for user-defined pointcuts.

Pointcuts may now be declared static, and only static pointcuts may be declared in classes and referred to with qualified references (such as MyAspect.move()).

Non-abstract pointcuts may now be declared final.

We have finally added an extremely general pointcut, if(BooleanExpression), that picks out join points programatically.

Type patterns

Our treatment of * and .. in type patterns is cleaner.

Type patterns now have the ability to include array types, and there is a new wildcard, +, to pick out all subtypes of a given type. Previously, the subtypes operator was only allowed in introduction, and was spelled differently.

Advice

Around advice is treated much more like a method, with a return value and an optional throws clause.

The advice precedence rules have been changed. Now, for example, a piece of after advice that appears lexically later than another piece of after advice will run later, as well. Previously, the relationship was the other way around, which caused no small amount of confusion.

After returning advice has lost a useless set of parentheses when not using the return value.

The thisStaticJoinPoint reflective object has been renamed, and the thisJoinPoint object hierarchy has been simplified.

Introduction and static crosscutting

On the static side of the language, introduction hasn't changed, but there is now a new keyword, declare, that is used to declare various statically-crosscutting properties. One of these properties is subtyping, so we've gotten rid of the ugly keywords +implements and +extends.

We have provided two new forms, declare error and declare warning, for the often-asked-for property of compile-time error detection based on crosscutting properties.

AspectJ's interaction with checked exceptions is now firmly on the side of static crosscutting, since Java treats such exceptions at compile-time. A new form, declare soft, can be used to "soften" checked exceptions into an unchecked form. This may affect some uses of around advice that previously mucked with the exception checking system.

Aspects

The "of each" modifiers have been renamed. Apart from the spelling, the main interesting difference is the splitting up of of eachobject into two different modifiers, parallel with the split of instanceof into this and target.

The dominates keyword now takes a type pattern, rather than a type. This allows an aspect A, for example, to declare that its advice should dominate the advice of another aspect B as well as its subtypes, with the new + subtypes operator: aspect A dominates B+.

Compiler

The most important change in the compiler is that it supports the new language. In addition, all reported bugs in the last release have been fixed. Thanks for your bug reports.

The compiler also gets a new -encoding flag in this release for handling source files that are not in standard US-ASCII format. Thanks to Nakamura Tadashi for both suggesting this feature and for submitting a nice patch to implement it.

Known Limitations

The previous compiler's limitations regarding join points that occurred in anonymous classes have all been eliminated. Unfortunately, eliminating this restriction has resulted in preprocessed source code that is less readable than in previous releases. More care will be taken in the next release to mitigate this effect.

Many semantic errors are not caught by ajc but fall through to javac. Moreover, some errors regarding the initialization of final fields might never show up when using ajc. This will be fixed shortly.

Documentation

Although we spent much of our time this release cycle updating the documentation to the new language rather than improving its content, we did make some structural improvements. The old Primer has been split into a Programming Guide, covering the language, and a Development Environment Guide, covering the develompent tools. In addition, printable versions of both guides (in PDF) are finally included in the documentation package.

Ajdoc

Ajdoc was rewritten to conform with the language changes and provide support for other AspectJ/Java compilers. Our doclet is used by default creating AspectJ-specific documentation, or Sun's standard doclet can be used by passing the '-standard' flag to Ajdoc to produce regular Javadoc documentation (excluding AspectJ-specifics).

Ant

An Ajdoc task is now available. The Ajc ant task was improved to be completely back-compatible with the Javac task.

AJBrowser

The "AspectJ Browser" is a new standalone source code browsing application. It will let you compile ".lst" files, view the structure for those files and navigate the corresponding source code.

AJDE

AJDE for JBuilder

Installation
Key Improvements
Known Bugs & Limitations

AJDE for Forte

Installation
Key Improvements
Known Bugs & Limitations

AJDE for Emacs

AspectJ-mode now includes a toggle in the AspectJ menu that disables its intrusive functions, enabling easy switching between Java and AspectJ projects. See the README and CHANGES files in the distribution for additional details.

AJDEE is now compatible with JDEE 2.2.7.1, JDEE 2.2.8beta4, and speedbar 0.14alpha. It a toggle in the AspectJ menu that disables its intrusive functions, enabling easy switching between Java and AspectJ projects. See the README and CHANGES files in the distribution for additional details.