80N/A/*
553N/A * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
80N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
80N/A *
80N/A * This code is free software; you can redistribute it and/or modify it
80N/A * under the terms of the GNU General Public License version 2 only, as
80N/A * published by the Free Software Foundation.
80N/A *
80N/A * This code is distributed in the hope that it will be useful, but WITHOUT
80N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
80N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
80N/A * version 2 for more details (a copy is included in the LICENSE file that
80N/A * accompanied this code).
80N/A *
80N/A * You should have received a copy of the GNU General Public License version
80N/A * 2 along with this work; if not, write to the Free Software Foundation,
80N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
80N/A *
553N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
553N/A * or visit www.oracle.com if you need additional information or have any
553N/A * questions.
80N/A */
80N/A
80N/A/*
80N/A * @test
80N/A * @bug 6500701
80N/A * @summary Enhanced for loop with generics generates faulty bytecode
80N/A * @author Maurizio Cimadamore
80N/A *
80N/A */
80N/A
80N/Aimport java.util.ArrayList;
80N/Aimport java.util.List;
80N/A
80N/Apublic class T6500701 {
80N/A
80N/A private static void test() {
80N/A List list = new ArrayList();
80N/A list.add("");
80N/A List<Integer> aList = new ArrayList<Integer>();
80N/A aList.addAll(list);
80N/A for (Object a : aList) {
80N/A System.out.println(a);
80N/A }
80N/A }
80N/A
80N/A public static void main(String[] args) {
80N/A test();
80N/A }
80N/A}