1 package com.puppycrawl.tools.checkstyle.annotation;
2 //this file compiles in eclipse 3.4 but not with Sun's JDK 1.6.0.11
3
4 /** FIXME: CheckStyle's ANTL grammar cannot handle this syntax
5 @SuppressWarnings({,})
6 */
7 public class AnnotationUseWithTrailingComma
8 {
9 @SuppressWarnings({"common",})
10 public void foo() {
11
12
13 @SuppressWarnings({"common","foo",})
14 Object o = new Object() {
15
16 @SuppressWarnings(value={"common",})
17 public String toString() {
18
19 @SuppressWarnings(value={"leo","herbie",})
20 final String pooches = "leo.herbie";
21
22 return pooches;
23 }
24 };
25 }
26
27 @Test(value={(false) ? "" : "foo",}, more={(true) ? "" : "bar",})
28 /** FIXME: CheckStyle's ANTL grammar cannot handle this syntax
29 @Pooches(tokens={,},other={,})
30 */
31 enum P {
32
33 @Pooches(tokens={Pooches.class,},other={1,})
34 L,
35
36 /** FIXME: CheckStyle's ANTL grammar cannot handle this syntax
37 @Test(value={,}, more={(false) ? "" : "unchecked",})
38 */
39 Y;
40 }
41
42 }
43
44 @interface Test {
45 String[] value();
46 String[] more() default {};
47 /** FIXME: CheckStyle's ANTL grammar cannot handle this syntax
48 String[] moreAr() default {,};
49 */
50 }
51
52 @interface Pooches {
53
54 Class<?>[] tokens();
55 int[] other();
56 }
57