/* * AOPTest * Copyright (c) 2001-2006 MessageOne Inc. */ package example; public class AOPTest { public static void doSomething() {} public static void cleanup() { try { doSomething(); } catch(Exception ex) { // ignore } } /*Replace cleanup with either of the following and it works: public static void cleanup() { doSomething(); } OR public static void cleanup() { try { int x = 1; doSomething(); } catch(Exception ex) { // ignore } } */ public static void main(String[] args) throws Throwable { AOPTest.cleanup(); } }