test/tools/javac/annotations/pos/TrailingComma.java

Tue, 02 Mar 2010 16:43:29 -0800

author
jjg
date
Tue, 02 Mar 2010 16:43:29 -0800
changeset 514
235135d61974
parent 417
d0f541480556
child 554
9d9f26857129
permissions
-rw-r--r--

6931127: strange test class files
Reviewed-by: darcy

darcy@417 1 /*
darcy@417 2 * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
darcy@417 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
darcy@417 4 *
darcy@417 5 * This code is free software; you can redistribute it and/or modify it
darcy@417 6 * under the terms of the GNU General Public License version 2 only, as
darcy@417 7 * published by the Free Software Foundation.
darcy@417 8 *
darcy@417 9 * This code is distributed in the hope that it will be useful, but WITHOUT
darcy@417 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
darcy@417 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
darcy@417 12 * version 2 for more details (a copy is included in the LICENSE file that
darcy@417 13 * accompanied this code).
darcy@417 14 *
darcy@417 15 * You should have received a copy of the GNU General Public License version
darcy@417 16 * 2 along with this work; if not, write to the Free Software Foundation,
darcy@417 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
darcy@417 18 *
darcy@417 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
darcy@417 20 * CA 95054 USA or visit www.sun.com if you need additional information or
darcy@417 21 * have any questions.
darcy@417 22 */
darcy@417 23
darcy@417 24 /*
darcy@417 25 * @test
darcy@417 26 * @bug 6337964
darcy@417 27 * @summary javac incorrectly disallows trailing comma in annotation arrays
darcy@417 28 * @author darcy
darcy@417 29 * @compile TrailingComma.java
darcy@417 30 */
darcy@417 31
darcy@417 32 import java.lang.annotation.*;
darcy@417 33
darcy@417 34 @interface TestAnnotation {
darcy@417 35 SuppressWarnings[] value() default {@SuppressWarnings({"",})};
darcy@417 36 }
darcy@417 37
darcy@417 38
darcy@417 39 @TestAnnotation({@SuppressWarnings(),
darcy@417 40 @SuppressWarnings({"Beware the ides of March.",}),
darcy@417 41 @SuppressWarnings({"Look both ways", "Before Crossing",}), })
darcy@417 42 public class TrailingComma {
darcy@417 43 }

mercurial