Mon, 17 Oct 2011 12:57:36 +0100
7093325: Redundant entry in bytecode exception table
Summary: Inlining of finalizers does not update gaps list accordingly
Reviewed-by: jjg
mcimadamore@33 | 1 | /* |
ohair@554 | 2 | * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. |
mcimadamore@33 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
mcimadamore@33 | 4 | * |
mcimadamore@33 | 5 | * This code is free software; you can redistribute it and/or modify it |
mcimadamore@33 | 6 | * under the terms of the GNU General Public License version 2 only, as |
mcimadamore@33 | 7 | * published by the Free Software Foundation. |
mcimadamore@33 | 8 | * |
mcimadamore@33 | 9 | * This code is distributed in the hope that it will be useful, but WITHOUT |
mcimadamore@33 | 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
mcimadamore@33 | 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
mcimadamore@33 | 12 | * version 2 for more details (a copy is included in the LICENSE file that |
mcimadamore@33 | 13 | * accompanied this code). |
mcimadamore@33 | 14 | * |
mcimadamore@33 | 15 | * You should have received a copy of the GNU General Public License version |
mcimadamore@33 | 16 | * 2 along with this work; if not, write to the Free Software Foundation, |
mcimadamore@33 | 17 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
mcimadamore@33 | 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. |
mcimadamore@33 | 22 | */ |
mcimadamore@33 | 23 | |
mcimadamore@33 | 24 | /* |
mcimadamore@33 | 25 | * @test |
mcimadamore@33 | 26 | * @bug 6682380 6679509 |
mcimadamore@33 | 27 | * @summary Foreach loop with generics inside finally block crashes javac with -target 1.5 |
mcimadamore@33 | 28 | * @author Jan Lahoda, Maurizio Cimadamore |
jjg@287 | 29 | * @compile -source 1.5 -target 1.5 T6682380.java |
mcimadamore@33 | 30 | */ |
mcimadamore@33 | 31 | |
mcimadamore@33 | 32 | import java.util.List; |
mcimadamore@33 | 33 | |
mcimadamore@33 | 34 | public class T6682380<X> { |
mcimadamore@33 | 35 | |
mcimadamore@33 | 36 | public static void main(String[] args) { |
mcimadamore@33 | 37 | try { |
mcimadamore@33 | 38 | } finally { |
mcimadamore@33 | 39 | List<T6682380<?>> l = null; |
mcimadamore@33 | 40 | T6682380<?>[] a = null; |
mcimadamore@33 | 41 | for (T6682380<?> e1 : l); |
mcimadamore@33 | 42 | for (T6682380<?> e2 : a); |
mcimadamore@33 | 43 | } |
mcimadamore@33 | 44 | } |
mcimadamore@33 | 45 | } |