* merged default branch into jitcache-arm-x86 branch
[cacao.git] / tests / stack / nestedconstructorexception2.java
1 class nestedconstructorexception2_1 {
2                 nestedconstructorexception2_1() {
3                         String s=null;
4                         s.length();
5                 }
6 }
7
8 public class nestedconstructorexception2 {
9
10         public nestedconstructorexception2(int val) throws Throwable {
11                 try {
12                         switch (val) {
13                                 case 1:
14                                         nestedconstructorexception2 y=new nestedconstructorexception2(2);
15                                         break;
16                                 case 2:
17                                         nestedconstructorexception2 y1=new nestedconstructorexception2(3);
18                                         break;
19                                 case 3:
20                                         Object o=new nestedconstructorexception2_1();
21                                         break;
22                                 default:
23
24                         }
25                 } catch (Throwable t) {
26                         System.out.println("Something caught in constructor");
27                         throw t;
28                 }
29         }
30
31
32         public static void main (String args[]) {
33                 try {
34                         nestedconstructorexception2 x=new nestedconstructorexception2(1);
35                 } catch (Throwable t) {
36                         t.printStackTrace();
37                 }
38         }
39 }