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) 2012, 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 8002304
27 * @summary Test for various method types in the method summary table
28 * @author Bhavesh Patel
29 * @library ../lib/
30 * @build JavadocTester TestMethodTypes
31 * @run main TestMethodTypes
32 */
34 public class TestMethodTypes extends JavadocTester {
36 //Test information.
37 private static final String BUG_ID = "8002304";
39 //Javadoc arguments.
40 private static final String[] ARGS = new String[] {
41 "-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg1"
42 };
44 private static final String[][] TEST = {
45 {BUG_ID + FS + "pkg1" + FS + "A.html",
46 "var methods = {"
47 },
49 {BUG_ID + FS + "pkg1" + FS + "A.html",
50 "<caption><span id=\"t0\" class=\"activeTableTab\"><span>All " +
51 "Methods</span><span class=\"tabEnd\"> </span></span>" +
52 "<span id=\"t1\" class=\"tableTab\"><span><a href=\"javascript:show(1);\">" +
53 "Static Methods</a></span><span class=\"tabEnd\"> </span></span>" +
54 "<span id=\"t2\" class=\"tableTab\"><span><a href=\"javascript:show(2);\">" +
55 "Instance Methods</a></span><span class=\"tabEnd\"> </span></span>" +
56 "<span id=\"t4\" class=\"tableTab\"><span><a href=\"javascript:show(8);\">" +
57 "Concrete Methods</a></span><span class=\"tabEnd\"> </span></span>" +
58 "<span id=\"t6\" class=\"tableTab\"><span><a href=\"javascript:show(32);\">" +
59 "Deprecated Methods</a></span><span class=\"tabEnd\"> </span></span>" +
60 "</caption>"
61 },
63 {BUG_ID + FS + "pkg1" + FS + "A.html",
64 "<tr id=\"i0\" class=\"altColor\">"
65 },
67 {BUG_ID + FS + "pkg1" + FS + "B.html",
68 "<caption><span id=\"t0\" class=\"activeTableTab\"><span>All " +
69 "Methods</span><span class=\"tabEnd\"> </span></span>" +
70 "<span id=\"t2\" class=\"tableTab\"><span><a href=\"javascript:show(2);\">" +
71 "Instance Methods</a></span><span class=\"tabEnd\"> </span></span>" +
72 "<span id=\"t3\" class=\"tableTab\"><span><a href=\"javascript:show(4);\">" +
73 "Abstract Methods</a></span><span class=\"tabEnd\"> </span></span>" +
74 "</caption>"
75 },
77 {BUG_ID + FS + "pkg1" + FS + "D.html",
78 "var methods = {"
79 },
81 {BUG_ID + FS + "pkg1" + FS + "D.html",
82 "<caption><span id=\"t0\" class=\"activeTableTab\"><span>All " +
83 "Methods</span><span class=\"tabEnd\"> </span></span>" +
84 "<span id=\"t2\" class=\"tableTab\"><span><a href=\"javascript:show(2);\">" +
85 "Instance Methods</a></span><span class=\"tabEnd\"> </span></span>" +
86 "<span id=\"t3\" class=\"tableTab\"><span><a href=\"javascript:show(4);\">" +
87 "Abstract Methods</a></span><span class=\"tabEnd\"> </span></span>" +
88 "<span id=\"t4\" class=\"tableTab\"><span><a href=\"javascript:show(8);\">" +
89 "Concrete Methods</a></span><span class=\"tabEnd\"> </span></span>" +
90 "<span id=\"t6\" class=\"tableTab\"><span><a href=\"javascript:show(32);\">" +
91 "Deprecated Methods</a></span><span class=\"tabEnd\"> </span></span>" +
92 "</caption>"
93 },
95 {BUG_ID + FS + "pkg1" + FS + "D.html",
96 "<tr id=\"i0\" class=\"altColor\">"
97 },
98 };
99 private static final String[][] NEGATED_TEST = {
100 {BUG_ID + FS + "pkg1" + FS + "A.html",
101 "<caption><span>Methods</span><span class=\"tabEnd\"> </span>" +
102 "</caption>"
103 },
105 {BUG_ID + FS + "pkg1" + FS + "B.html",
106 "<caption><span>Methods</span><span class=\"tabEnd\"> </span>" +
107 "</caption>"
108 },
110 {BUG_ID + FS + "pkg" + FS + "D.html",
111 "<caption><span>Methods</span><span class=\"tabEnd\"> </span>" +
112 "</caption>"
113 },
114 };
116 /**
117 * The entry point of the test.
118 * @param args the array of command line arguments.
119 */
120 public static void main(String[] args) {
121 TestMethodTypes tester = new TestMethodTypes();
122 run(tester, ARGS, TEST, NEGATED_TEST);
123 tester.printSummary();
124 }
126 /**
127 * {@inheritDoc}
128 */
129 public String getBugId() {
130 return BUG_ID;
131 }
133 /**
134 * {@inheritDoc}
135 */
136 public String getBugName() {
137 return getClass().getName();
138 }
139 }