* configure.ac: New switch for disabling -O2 (--disable-optimizations).
[cacao.git] / tests / InlineSynchronized.java
1 public class InlineSynchronized {
2
3         public static void testit(InlineSynchronized o) throws Exception {
4                 synchronized(o) {
5                         System.out.println("Within protected section, about to throw an exception");
6                         throw new Exception("");
7                 }
8         }
9         public static void main(String args[]) {
10                 InlineSynchronized o=new InlineSynchronized();
11                 try {
12                         try {
13                                 testit(o);
14                         } catch (Exception e) {
15                                 System.out.println("First catch");
16                                 testit(o);
17                         }
18                 } catch (Exception e) {
19                         System.out.println("Second catch");
20                 }
21         }
22 }