~ubuntu-branches/ubuntu/natty/aspectj/natty

« back to all changes in this revision

Viewing changes to org.aspectj/modules/tests/bugs/AfterThrowingAdviceSyntaxError.java

  • Committer: Bazaar Package Importer
  • Author(s): Damien Raude-Morvan
  • Date: 2009-10-04 16:37:23 UTC
  • mfrom: (1.1.3 upstream) (3.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20091004163723-ck4y7j7fhjxskkie
Tags: 1.6.6+dfsg-1
* New upstream release.
  - Update 02_use_gjdoc.diff patch
* Update my email address

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
import org.aspectj.lang.*;
2
 
 
3
 
public class AfterThrowingAdviceSyntaxError {
4
 
 
5
 
        public static void main(String[] args) {
6
 
                perform();
7
 
        }
8
 
 
9
 
        private static void perform() {
10
 
                Object nullObj = null;
11
 
                nullObj.toString();
12
 
        }
13
 
}
14
 
 
15
 
aspect ExceptionLoggerAspectV2 
16
 
{
17
 
 
18
 
        pointcut exceptionLogMethods()
19
 
                : call(* *.*(..)) && !within(ExceptionLoggerAspectV2);
20
 
 
21
 
        after() thowing(Throwable ex) : exceptionLogMethods() {
22
 
                Signature sig = thisJoinPointStaticPart.getSignature();
23
 
                System.out.printl("WARNING: " 
24
 
                        + sig.getDeclaringType().getName() + " "
25
 
                        + sig.getName() + " "
26
 
                        + "Exception logger aspect " + ex);
27
 
        }
28
 
}
 
 
b'\\ No newline at end of file'