Thu, 26 Jul 2018 15:47:44 +0800
Added tag mips64el-jdk8u172-b13 for changeset a5ddc08adcc0
1 /*
2 * @test /nodynamiccopyright/
3 * @bug 8025272
4 * @summary doclint needs to check for valid usage of at-value tag
5 * @build DocLintTester
6 * @run main DocLintTester -ref ValueTest.out ValueTest.java
7 */
9 /** */
10 public class ValueTest {
11 /*
12 * Tests for {@value} without a reference
13 */
15 /** valid: {@value} */
16 public static final boolean cBoolean = false;
18 /** valid: {@value} */
19 public static final byte cByte = 0;
21 /** valid: {@value} */
22 public static final short cShort = 0;
24 /** valid: {@value} */
25 public static final int cInt = 0;
27 /** valid: {@value} */
28 public static final long cLong = 0L;
30 /** valid: {@value} */
31 public static final float cFloat = 0.0f;
33 /** valid: {@value} */
34 public static final double cDouble = 0.0;
36 /** valid: {@value} */
37 public static final String cString = "";
39 /** invalid class C: {@value} */
40 public class C { }
42 /** invalid enum E: {@value} */
43 public enum E {
44 /** invalid enum constant E1: {@value} */
45 E1
46 }
48 /** invalid field 1: {@value} */
49 public int f1;
51 /** invalid field 2: {@value} */
52 public int f2 = 3;
55 /*
56 * Tests for {@value} with a reference
57 */
59 /** valid: {@value Integer#SIZE} */
60 public int intRef;
62 /** invalid method: {@value Object#toString} */
63 public int badMethod;
65 /** invalid enum constant: {@value Thread.State#NEW} */
66 public int badEnum;
67 }