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

Thu, 25 Aug 2011 17:18:25 -0700

author
schien
date
Thu, 25 Aug 2011 17:18:25 -0700
changeset 1067
f497fac86cf9
parent 798
4868a36f6fd8
child 2525
2eb010b6cb22
permissions
-rw-r--r--

Added tag jdk8-b02 for changeset b3c059de2a61

darcy@417 1 /*
ohair@798 2 * Copyright (c) 2009, 2010, Oracle and/or its affiliates. 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 *
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.
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
mcimadamore@634 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