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