mcimadamore@33: /* mcimadamore@33: * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. mcimadamore@33: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. mcimadamore@33: * mcimadamore@33: * This code is free software; you can redistribute it and/or modify it mcimadamore@33: * under the terms of the GNU General Public License version 2 only, as mcimadamore@33: * published by the Free Software Foundation. mcimadamore@33: * mcimadamore@33: * This code is distributed in the hope that it will be useful, but WITHOUT mcimadamore@33: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or mcimadamore@33: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License mcimadamore@33: * version 2 for more details (a copy is included in the LICENSE file that mcimadamore@33: * accompanied this code). mcimadamore@33: * mcimadamore@33: * You should have received a copy of the GNU General Public License version mcimadamore@33: * 2 along with this work; if not, write to the Free Software Foundation, mcimadamore@33: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. mcimadamore@33: * mcimadamore@33: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, mcimadamore@33: * CA 95054 USA or visit www.sun.com if you need additional information or mcimadamore@33: * have any questions. mcimadamore@33: */ mcimadamore@33: mcimadamore@33: /* mcimadamore@33: * @test mcimadamore@33: * @bug 6682380 6679509 mcimadamore@33: * @summary Foreach loop with generics inside finally block crashes javac with -target 1.5 mcimadamore@33: * @author Jan Lahoda, Maurizio Cimadamore mcimadamore@33: * @compile -target 1.5 T6682380.java mcimadamore@33: */ mcimadamore@33: mcimadamore@33: import java.util.List; mcimadamore@33: mcimadamore@33: public class T6682380 { mcimadamore@33: mcimadamore@33: public static void main(String[] args) { mcimadamore@33: try { mcimadamore@33: } finally { mcimadamore@33: List> l = null; mcimadamore@33: T6682380[] a = null; mcimadamore@33: for (T6682380 e1 : l); mcimadamore@33: for (T6682380 e2 : a); mcimadamore@33: } mcimadamore@33: } mcimadamore@33: }