darcy@417: /* ohair@554: * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. darcy@417: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. darcy@417: * darcy@417: * This code is free software; you can redistribute it and/or modify it darcy@417: * under the terms of the GNU General Public License version 2 only, as darcy@417: * published by the Free Software Foundation. darcy@417: * darcy@417: * This code is distributed in the hope that it will be useful, but WITHOUT darcy@417: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or darcy@417: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License darcy@417: * version 2 for more details (a copy is included in the LICENSE file that darcy@417: * accompanied this code). darcy@417: * darcy@417: * You should have received a copy of the GNU General Public License version darcy@417: * 2 along with this work; if not, write to the Free Software Foundation, darcy@417: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. darcy@417: * ohair@554: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ohair@554: * or visit www.oracle.com if you need additional information or have any ohair@554: * questions. darcy@417: */ darcy@417: darcy@417: /* darcy@417: * @test darcy@417: * @bug 6337964 darcy@417: * @summary javac incorrectly disallows trailing comma in annotation arrays darcy@417: * @author darcy darcy@417: * @compile TrailingComma.java darcy@417: */ darcy@417: darcy@417: import java.lang.annotation.*; darcy@417: darcy@417: @interface TestAnnotation { darcy@417: SuppressWarnings[] value() default {@SuppressWarnings({"",})}; darcy@417: } darcy@417: darcy@417: darcy@417: @TestAnnotation({@SuppressWarnings(), darcy@417: @SuppressWarnings({"Beware the ides of March.",}), darcy@417: @SuppressWarnings({"Look both ways", "Before Crossing",}), }) darcy@417: public class TrailingComma { darcy@417: }