Mon, 16 Sep 2013 14:13:44 +0200
8021112: Spurious unchecked warning reported by javac
6480588: No way to suppress deprecation warnings when implementing deprecated interface
Summary: Fixing DeferredLintHandler configuration, so lint warnings are reported with correct @SuppressWarnings settings
Reviewed-by: jjg, vromero
1 /*
2 * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
24 /*
25 * @test
26 * @bug 4654308 4767038
27 * @summary Use a Taglet and include some inline tags such as {@link}. The
28 * inline tags should be interpreted properly.
29 * Run Javadoc on some sample source that uses {@inheritDoc}. Make
30 * sure that only the first sentence shows up in the summary table.
31 * @author jamieh
32 * @library ../lib/
33 * @build JavadocTester
34 * @build TestTaglets
35 * @build taglets.Foo
36 * @run main TestTaglets
37 */
39 public class TestTaglets extends JavadocTester {
41 //Test information.
42 private static final String BUG_ID = "4654308-4767038";
43 private static final String OUTPUT_DIR = BUG_ID;
45 //Javadoc arguments.
46 private static final String[] ARGS_4654308 = new String[] {
47 "-d", "4654308", "-tagletpath", SRC_DIR, "-taglet", "taglets.Foo",
48 "-sourcepath", SRC_DIR, SRC_DIR + FS + "C.java"
49 };
51 private static final String[] ARGS_4767038 = new String[] {
52 "-d", "4767038", "-sourcepath", SRC_DIR, SRC_DIR + FS + "Parent.java",
53 SRC_DIR + FS + "Child.java"
54 };
56 //Input for string search tests.
57 private static final String[][] TEST_4654308 = new String[][] {
58 {"4654308" + FS + "C.html", "<span class=\"strong\">Foo:</span></dt>" +
59 "<dd>my only method is <a href=\"C.html#method()\"><code>here" +
60 "</code></a></dd></dl>"}
61 };
62 private static final String[][] NEGATED_TEST_4654308 = NO_TEST;
64 private static final String[][] TEST_4767038 = new String[][] {
65 {"4767038" + FS + "Child.html",
66 "This is the first sentence."}
67 };
68 private static final String[][] NEGATED_TEST_4767038 = NO_TEST;
71 /**
72 * The entry point of the test.
73 * @param args the array of command line arguments.
74 */
75 public static void main(String[] args) {
76 TestTaglets tester = new TestTaglets();
77 run(tester, ARGS_4654308, TEST_4654308, NEGATED_TEST_4654308);
78 tester.printSummary();
79 tester = new TestTaglets();
80 run(tester, ARGS_4767038, TEST_4767038, NEGATED_TEST_4767038);
81 tester.printSummary();
82 }
84 /**
85 * {@inheritDoc}
86 */
87 public String getBugId() {
88 return BUG_ID;
89 }
91 /**
92 * {@inheritDoc}
93 */
94 public String getBugName() {
95 return getClass().getName();
96 }
97 }