Community
Participate
Working Groups
Is handler-execution viable as a binary join point? The developers of Javac are delivering on their 1.4 promise to aggressively inline exception handlers. As a result, handlers produced by javac 1.4.1 are not recognized by ajc right now. (See test applied to tests/binaryWarnings/injars/app-javac-1.4.jar (compiled with javac 1.4.1 on Windows NT)). At present, we know that around and after advice cannot be implemented for exception handlers in all cases. If it looks like declare-warning and before advice cannot be implemented for handlers in all cases, then we should consider - documenting it - testing for all relevant compilers - providing compiler warnings in -verbose mode when source contains handler pointcut designators - deprecating the handler pointcut - removing the handler pointcut from the 1.1 language
I believe that before advice and declare warning work acceptably in this case. My reading of this test case is that ajc identifies this handler just fine, but that it gets the initial line number wrong by pointing to the first line of code within the handler rather than to the catch clause itself. See bug 37020 for more comments on this and a place to discuss the line number issue further.