10
|
1 |
/*
|
5520
|
2 |
* Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
|
10
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
4 |
*
|
|
5 |
* This code is free software; you can redistribute it and/or modify it
|
|
6 |
* under the terms of the GNU General Public License version 2 only, as
|
|
7 |
* published by the Free Software Foundation.
|
|
8 |
*
|
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that
|
|
13 |
* accompanied this code).
|
|
14 |
*
|
|
15 |
* You should have received a copy of the GNU General Public License version
|
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
18 |
*
|
5520
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
20 |
* or visit www.oracle.com if you need additional information or have any
|
|
21 |
* questions.
|
10
|
22 |
*/
|
|
23 |
|
|
24 |
/**
|
|
25 |
* @test
|
|
26 |
* @bug 6464451
|
|
27 |
* @summary javac in 5.0ux can not compile try-finally block which has a lot of "return"
|
|
28 |
* @author Wei Tao
|
2983
|
29 |
* @compile -source 5 -target 5 BigFinally.java
|
10
|
30 |
* @clean BigFinally
|
|
31 |
* @compile/fail BigFinally.java
|
|
32 |
*/
|
|
33 |
|
|
34 |
public class BigFinally {
|
|
35 |
static public int func(int i) {
|
|
36 |
try {
|
|
37 |
if(i == 1) return 1;
|
|
38 |
} finally {
|
|
39 |
try {
|
|
40 |
if(i == 2) return 2;
|
|
41 |
if(i == 3 ) return 3;
|
|
42 |
if(i == 4 ) return 4;
|
|
43 |
if(i == 5 ) return 5;
|
|
44 |
if(i == 6 ) return 6;
|
|
45 |
if(i == 7 ) return 7;
|
|
46 |
if(i == 8 ) return 8;
|
|
47 |
if(i == 9 ) return 9;
|
|
48 |
if(i == 10 ) return 10;
|
|
49 |
if(i == 11 ) return 11;
|
|
50 |
if(i == 12 ) return 12;
|
|
51 |
if(i == 13 ) return 13;
|
|
52 |
if(i == 14 ) return 14;
|
|
53 |
if(i == 15 ) return 15;
|
|
54 |
if(i == 16 ) return 16;
|
|
55 |
if(i == 17 ) return 17;
|
|
56 |
if(i == 18 ) return 18;
|
|
57 |
if(i == 19 ) return 19;
|
|
58 |
if(i == 20 ) return 20;
|
|
59 |
if(i == 21 ) return 21;
|
|
60 |
if(i == 22 ) return 22;
|
|
61 |
if(i == 23 ) return 23;
|
|
62 |
if(i == 24 ) return 24;
|
|
63 |
if(i == 25 ) return 25;
|
|
64 |
if(i == 26 ) return 26;
|
|
65 |
if(i == 27 ) return 27;
|
|
66 |
if(i == 28 ) return 28;
|
|
67 |
if(i == 29 ) return 29;
|
|
68 |
if(i == 30 ) return 30;
|
|
69 |
if(i == 31 ) return 31;
|
|
70 |
if(i == 32 ) return 32;
|
|
71 |
if(i == 33 ) return 33;
|
|
72 |
if(i == 34 ) return 34;
|
|
73 |
if(i == 35 ) return 35;
|
|
74 |
if(i == 36 ) return 36;
|
|
75 |
if(i == 37 ) return 37;
|
|
76 |
if(i == 38 ) return 38;
|
|
77 |
if(i == 39 ) return 39;
|
|
78 |
if(i == 40 ) return 40;
|
|
79 |
if(i == 41 ) return 41;
|
|
80 |
if(i == 42 ) return 42;
|
|
81 |
if(i == 43 ) return 43;
|
|
82 |
if(i == 44 ) return 44;
|
|
83 |
if(i == 45 ) return 45;
|
|
84 |
if(i == 46 ) return 46;
|
|
85 |
if(i == 47 ) return 47;
|
|
86 |
if(i == 48 ) return 48;
|
|
87 |
if(i == 49 ) return 49;
|
|
88 |
if(i == 50 ) return 50;
|
|
89 |
if(i == 51 ) return 51;
|
|
90 |
if(i == 52 ) return 52;
|
|
91 |
if(i == 53 ) return 53;
|
|
92 |
if(i == 54 ) return 54;
|
|
93 |
if(i == 55 ) return 55;
|
|
94 |
if(i == 56 ) return 56;
|
|
95 |
if(i == 57 ) return 57;
|
|
96 |
if(i == 58 ) return 58;
|
|
97 |
if(i == 59 ) return 59;
|
|
98 |
if(i == 60 ) return 60;
|
|
99 |
if(i == 61 ) return 61;
|
|
100 |
if(i == 62 ) return 62;
|
|
101 |
if(i == 63 ) return 63;
|
|
102 |
if(i == 64 ) return 64;
|
|
103 |
if(i == 65 ) return 65;
|
|
104 |
if(i == 66 ) return 66;
|
|
105 |
if(i == 67 ) return 67;
|
|
106 |
if(i == 68 ) return 68;
|
|
107 |
if(i == 69 ) return 69;
|
|
108 |
if(i == 70 ) return 70;
|
|
109 |
if(i == 71 ) return 71;
|
|
110 |
if(i == 72 ) return 72;
|
|
111 |
if(i == 73 ) return 73;
|
|
112 |
if(i == 74 ) return 74;
|
|
113 |
if(i == 75 ) return 75;
|
|
114 |
if(i == 76 ) return 76;
|
|
115 |
if(i == 77 ) return 77;
|
|
116 |
if(i == 78 ) return 78;
|
|
117 |
if(i == 79 ) return 79;
|
|
118 |
if(i == 80 ) return 80;
|
|
119 |
if(i == 81 ) return 81;
|
|
120 |
if(i == 82 ) return 82;
|
|
121 |
if(i == 83 ) return 83;
|
|
122 |
if(i == 84 ) return 84;
|
|
123 |
if(i == 85 ) return 85;
|
|
124 |
if(i == 86 ) return 86;
|
|
125 |
if(i == 87 ) return 87;
|
|
126 |
if(i == 88 ) return 88;
|
|
127 |
if(i == 89 ) return 89;
|
|
128 |
if(i == 90 ) return 90;
|
|
129 |
if(i == 91 ) return 91;
|
|
130 |
if(i == 92 ) return 92;
|
|
131 |
if(i == 93 ) return 93;
|
|
132 |
if(i == 94 ) return 94;
|
|
133 |
if(i == 95 ) return 95;
|
|
134 |
if(i == 96 ) return 96;
|
|
135 |
if(i == 97 ) return 97;
|
|
136 |
if(i == 98 ) return 98;
|
|
137 |
if(i == 99 ) return 99;
|
|
138 |
if(i == 100 ) return 100;
|
|
139 |
} finally {
|
|
140 |
int x = 0;
|
|
141 |
x += 1;
|
|
142 |
x += 2;
|
|
143 |
x += 3;
|
|
144 |
x += 4;
|
|
145 |
x += 5;
|
|
146 |
x += 6;
|
|
147 |
x += 7;
|
|
148 |
x += 8;
|
|
149 |
x += 9;
|
|
150 |
x += 10;
|
|
151 |
x += 11;
|
|
152 |
x += 12;
|
|
153 |
x += 13;
|
|
154 |
x += 14;
|
|
155 |
x += 15;
|
|
156 |
x += 16;
|
|
157 |
x += 17;
|
|
158 |
x += 18;
|
|
159 |
x += 19;
|
|
160 |
x += 20;
|
|
161 |
x += 21;
|
|
162 |
x += 22;
|
|
163 |
x += 23;
|
|
164 |
x += 24;
|
|
165 |
x += 25;
|
|
166 |
x += 26;
|
|
167 |
x += 27;
|
|
168 |
x += 28;
|
|
169 |
x += 29;
|
|
170 |
x += 30;
|
|
171 |
x += 31;
|
|
172 |
x += 32;
|
|
173 |
x += 33;
|
|
174 |
x += 34;
|
|
175 |
x += 35;
|
|
176 |
x += 36;
|
|
177 |
x += 37;
|
|
178 |
x += 38;
|
|
179 |
x += 39;
|
|
180 |
x += 40;
|
|
181 |
x += 41;
|
|
182 |
x += 42;
|
|
183 |
x += 43;
|
|
184 |
x += 44;
|
|
185 |
x += 45;
|
|
186 |
x += 46;
|
|
187 |
x += 47;
|
|
188 |
x += 48;
|
|
189 |
x += 49;
|
|
190 |
x += 50;
|
|
191 |
x += 51;
|
|
192 |
x += 52;
|
|
193 |
x += 53;
|
|
194 |
x += 54;
|
|
195 |
x += 55;
|
|
196 |
x += 56;
|
|
197 |
x += 57;
|
|
198 |
x += 58;
|
|
199 |
x += 59;
|
|
200 |
x += 60;
|
|
201 |
x += 61;
|
|
202 |
x += 62;
|
|
203 |
x += 63;
|
|
204 |
x += 64;
|
|
205 |
x += 65;
|
|
206 |
x += 66;
|
|
207 |
x += 67;
|
|
208 |
x += 68;
|
|
209 |
x += 69;
|
|
210 |
x += 70;
|
|
211 |
x += 71;
|
|
212 |
x += 72;
|
|
213 |
x += 73;
|
|
214 |
x += 74;
|
|
215 |
x += 75;
|
|
216 |
x += 76;
|
|
217 |
x += 77;
|
|
218 |
x += 78;
|
|
219 |
x += 79;
|
|
220 |
x += 80;
|
|
221 |
x += 81;
|
|
222 |
x += 82;
|
|
223 |
x += 83;
|
|
224 |
x += 84;
|
|
225 |
x += 85;
|
|
226 |
x += 86;
|
|
227 |
x += 87;
|
|
228 |
x += 88;
|
|
229 |
x += 89;
|
|
230 |
x += 90;
|
|
231 |
x += 91;
|
|
232 |
x += 92;
|
|
233 |
x += 93;
|
|
234 |
x += 94;
|
|
235 |
x += 95;
|
|
236 |
x += 96;
|
|
237 |
x += 97;
|
|
238 |
x += 98;
|
|
239 |
x += 99;
|
|
240 |
x += 100;
|
|
241 |
}
|
|
242 |
}
|
|
243 |
return 0;
|
|
244 |
}
|
|
245 |
}
|