diff options
Diffstat (limited to 'tests/bugs150')
-rw-r--r-- | tests/bugs150/Pr103097.aj | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/bugs150/Pr103097.aj b/tests/bugs150/Pr103097.aj new file mode 100644 index 000000000..e8e3cbb68 --- /dev/null +++ b/tests/bugs150/Pr103097.aj @@ -0,0 +1,23 @@ +import java.io.IOException; + +public aspect Pr103097 { + declare soft: IOException: + within(Pr103097) && + !withincode(* *(..)) && + !call(* *(..)); + + before() : execution(* main(..)) { + try { + doThrow(); + } catch (IOException e) { + throw new RuntimeException("IOException not softened as expected"); + } catch(org.aspectj.lang.SoftException ex) {} + } + + public static void doThrow() throws IOException { + throw new IOException("test"); + } + + public static void main(String args[]) { + } +}
\ No newline at end of file |