author | duke |
Wed, 05 Jul 2017 18:59:39 +0200 | |
changeset 18044 | f1a01fb5f958 |
parent 10950 | e87b50888909 |
permissions | -rw-r--r-- |
4877
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
1 |
/* |
10950 | 2 |
* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. |
4877
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
4 |
* |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
8 |
* |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
13 |
* accompanied this code). |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
14 |
* |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
18 |
* |
5520 | 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. |
|
4877
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
22 |
*/ |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
23 |
|
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
24 |
import java.io.*; |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
25 |
import java.lang.reflect.*; |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
26 |
import java.util.*; |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
27 |
import javax.tools.*; |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
28 |
|
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
29 |
import com.sun.source.tree.CompilationUnitTree; |
6597
9367c22c445f
6983239: TreeScanner does not scan default value for method
jjg
parents:
5520
diff
changeset
|
30 |
import com.sun.source.tree.Tree; |
4877
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
31 |
import com.sun.source.util.JavacTask; |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
32 |
import com.sun.tools.javac.api.JavacTool; |
6597
9367c22c445f
6983239: TreeScanner does not scan default value for method
jjg
parents:
5520
diff
changeset
|
33 |
import com.sun.tools.javac.tree.JCTree; |
9367c22c445f
6983239: TreeScanner does not scan default value for method
jjg
parents:
5520
diff
changeset
|
34 |
import com.sun.tools.javac.tree.JCTree.JCCompilationUnit; |
4877
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
35 |
import com.sun.tools.javac.util.List; |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
36 |
|
6597
9367c22c445f
6983239: TreeScanner does not scan default value for method
jjg
parents:
5520
diff
changeset
|
37 |
public abstract class AbstractTreeScannerTest { |
4877
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
38 |
|
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
39 |
/** |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
40 |
* Run the program. A base directory can be provided for file arguments. |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
41 |
* In jtreg mode, the -r option can be given to change the default base |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
42 |
* directory to the test root directory. For other options, see usage(). |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
43 |
* @param baseDir base directory for any file arguments. |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
44 |
* @param args command line args |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
45 |
* @return true if successful or in gui mode |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
46 |
*/ |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
47 |
boolean run(File baseDir, String... args) { |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
48 |
if (args.length == 0) { |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
49 |
usage(System.out); |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
50 |
return true; |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
51 |
} |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
52 |
|
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
53 |
ArrayList<File> files = new ArrayList<File>(); |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
54 |
for (int i = 0; i < args.length; i++) { |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
55 |
String arg = args[i]; |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
56 |
if (arg.equals("-q")) |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
57 |
quiet = true; |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
58 |
else if (arg.equals("-v")) |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
59 |
verbose = true; |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
60 |
else if (arg.equals("-r")) { |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
61 |
File d = baseDir; |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
62 |
while (!new File(d, "TEST.ROOT").exists()) { |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
63 |
d = d.getParentFile(); |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
64 |
if (d == null) |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
65 |
throw new Error("cannot find TEST.ROOT"); |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
66 |
} |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
67 |
baseDir = d; |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
68 |
} |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
69 |
else if (arg.startsWith("-")) |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
70 |
throw new Error("unknown option: " + arg); |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
71 |
else { |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
72 |
while (i < args.length) |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
73 |
files.add(new File(baseDir, args[i++])); |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
74 |
} |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
75 |
} |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
76 |
|
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
77 |
for (File file: files) { |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
78 |
if (file.exists()) |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
79 |
test(file); |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
80 |
else |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
81 |
error("File not found: " + file); |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
82 |
} |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
83 |
|
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
84 |
if (fileCount != 1) |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
85 |
System.err.println(fileCount + " files read"); |
6597
9367c22c445f
6983239: TreeScanner does not scan default value for method
jjg
parents:
5520
diff
changeset
|
86 |
System.err.println(treeCount + " tree nodes compared"); |
4877
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
87 |
if (errors > 0) |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
88 |
System.err.println(errors + " errors"); |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
89 |
|
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
90 |
return (errors == 0); |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
91 |
} |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
92 |
|
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
93 |
/** |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
94 |
* Print command line help. |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
95 |
* @param out output stream |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
96 |
*/ |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
97 |
void usage(PrintStream out) { |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
98 |
out.println("Usage:"); |
6597
9367c22c445f
6983239: TreeScanner does not scan default value for method
jjg
parents:
5520
diff
changeset
|
99 |
out.println(" java " + getClass().getName() + " options... files..."); |
4877
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
100 |
out.println(""); |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
101 |
out.println("where options include:"); |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
102 |
out.println("-q Quiet: don't report on inapplicable files"); |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
103 |
out.println("-v Verbose: report on files as they are being read"); |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
104 |
out.println(""); |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
105 |
out.println("files may be directories or files"); |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
106 |
out.println("directories will be scanned recursively"); |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
107 |
out.println("non java files, or java files which cannot be parsed, will be ignored"); |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
108 |
out.println(""); |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
109 |
} |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
110 |
|
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
111 |
/** |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
112 |
* Test a file. If the file is a directory, it will be recursively scanned |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
113 |
* for java files. |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
114 |
* @param file the file or directory to test |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
115 |
*/ |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
116 |
void test(File file) { |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
117 |
if (file.isDirectory()) { |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
118 |
for (File f: file.listFiles()) { |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
119 |
test(f); |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
120 |
} |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
121 |
return; |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
122 |
} |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
123 |
|
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
124 |
if (file.isFile() && file.getName().endsWith(".java")) { |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
125 |
try { |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
126 |
if (verbose) |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
127 |
System.err.println(file); |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
128 |
fileCount++; |
6597
9367c22c445f
6983239: TreeScanner does not scan default value for method
jjg
parents:
5520
diff
changeset
|
129 |
treeCount += test(read(file)); |
4877
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
130 |
} catch (ParseException e) { |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
131 |
if (!quiet) { |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
132 |
error("Error parsing " + file + "\n" + e.getMessage()); |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
133 |
} |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
134 |
} catch (IOException e) { |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
135 |
error("Error reading " + file + ": " + e); |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
136 |
} |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
137 |
return; |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
138 |
} |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
139 |
|
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
140 |
if (!quiet) |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
141 |
error("File " + file + " ignored"); |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
142 |
} |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
143 |
|
6597
9367c22c445f
6983239: TreeScanner does not scan default value for method
jjg
parents:
5520
diff
changeset
|
144 |
abstract int test(JCCompilationUnit t); |
9367c22c445f
6983239: TreeScanner does not scan default value for method
jjg
parents:
5520
diff
changeset
|
145 |
|
7846
f72ce57eb9c1
6982992: Tests CheckAttributedTree.java, JavacTreeScannerTest.java, and SourceTreeeScannerTest.java timeout
jjh
parents:
6601
diff
changeset
|
146 |
// See CR: 6982992 Tests CheckAttributedTree.java, JavacTreeScannerTest.java, and SourceTreeeScannerTest.java timeout |
f72ce57eb9c1
6982992: Tests CheckAttributedTree.java, JavacTreeScannerTest.java, and SourceTreeeScannerTest.java timeout
jjh
parents:
6601
diff
changeset
|
147 |
StringWriter sw = new StringWriter(); |
f72ce57eb9c1
6982992: Tests CheckAttributedTree.java, JavacTreeScannerTest.java, and SourceTreeeScannerTest.java timeout
jjh
parents:
6601
diff
changeset
|
148 |
PrintWriter pw = new PrintWriter(sw); |
f72ce57eb9c1
6982992: Tests CheckAttributedTree.java, JavacTreeScannerTest.java, and SourceTreeeScannerTest.java timeout
jjh
parents:
6601
diff
changeset
|
149 |
Reporter r = new Reporter(pw); |
f72ce57eb9c1
6982992: Tests CheckAttributedTree.java, JavacTreeScannerTest.java, and SourceTreeeScannerTest.java timeout
jjh
parents:
6601
diff
changeset
|
150 |
JavacTool tool = JavacTool.create(); |
f72ce57eb9c1
6982992: Tests CheckAttributedTree.java, JavacTreeScannerTest.java, and SourceTreeeScannerTest.java timeout
jjh
parents:
6601
diff
changeset
|
151 |
StandardJavaFileManager fm = tool.getStandardFileManager(r, null, null); |
f72ce57eb9c1
6982992: Tests CheckAttributedTree.java, JavacTreeScannerTest.java, and SourceTreeeScannerTest.java timeout
jjh
parents:
6601
diff
changeset
|
152 |
|
4877
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
153 |
/** |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
154 |
* Read a file. |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
155 |
* @param file the file to be read |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
156 |
* @return the tree for the content of the file |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
157 |
* @throws IOException if any IO errors occur |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
158 |
* @throws TreePosTest.ParseException if any errors occur while parsing the file |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
159 |
*/ |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
160 |
JCCompilationUnit read(File file) throws IOException, ParseException { |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
161 |
JavacTool tool = JavacTool.create(); |
7846
f72ce57eb9c1
6982992: Tests CheckAttributedTree.java, JavacTreeScannerTest.java, and SourceTreeeScannerTest.java timeout
jjh
parents:
6601
diff
changeset
|
162 |
r.errors = 0; |
4877
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
163 |
Iterable<? extends JavaFileObject> files = fm.getJavaFileObjects(file); |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
164 |
JavacTask task = tool.getTask(pw, fm, r, Collections.<String>emptyList(), null, files); |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
165 |
Iterable<? extends CompilationUnitTree> trees = task.parse(); |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
166 |
pw.flush(); |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
167 |
if (r.errors > 0) |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
168 |
throw new ParseException(sw.toString()); |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
169 |
Iterator<? extends CompilationUnitTree> iter = trees.iterator(); |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
170 |
if (!iter.hasNext()) |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
171 |
throw new Error("no trees found"); |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
172 |
JCCompilationUnit t = (JCCompilationUnit) iter.next(); |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
173 |
if (iter.hasNext()) |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
174 |
throw new Error("too many trees found"); |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
175 |
return t; |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
176 |
} |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
177 |
|
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
178 |
/** |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
179 |
* Report an error. When the program is complete, the program will either |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
180 |
* exit or throw an Error if any errors have been reported. |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
181 |
* @param msg the error message |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
182 |
*/ |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
183 |
void error(String msg) { |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
184 |
System.err.println(msg); |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
185 |
errors++; |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
186 |
} |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
187 |
|
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
188 |
/** |
6601 | 189 |
* Report an error. When the program is complete, the program will either |
190 |
* exit or throw an Error if any errors have been reported. |
|
191 |
* @param msg the error message |
|
192 |
*/ |
|
193 |
void error(JavaFileObject file, String msg) { |
|
194 |
System.err.println(file.getName() + ": " + msg); |
|
195 |
errors++; |
|
196 |
} |
|
197 |
||
198 |
/** |
|
4877
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
199 |
* Report an error for a specific tree node. |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
200 |
* @param file the source file for the tree |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
201 |
* @param t the tree node |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
202 |
* @param label an indication of the error |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
203 |
*/ |
6597
9367c22c445f
6983239: TreeScanner does not scan default value for method
jjg
parents:
5520
diff
changeset
|
204 |
void error(JavaFileObject file, Tree tree, String msg) { |
9367c22c445f
6983239: TreeScanner does not scan default value for method
jjg
parents:
5520
diff
changeset
|
205 |
JCTree t = (JCTree) tree; |
4877
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
206 |
error(file.getName() + ":" + getLine(file, t) + ": " + msg + " " + trim(t, 64)); |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
207 |
} |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
208 |
|
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
209 |
/** |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
210 |
* Get a trimmed string for a tree node, with normalized white space and limited length. |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
211 |
*/ |
6597
9367c22c445f
6983239: TreeScanner does not scan default value for method
jjg
parents:
5520
diff
changeset
|
212 |
String trim(Tree tree, int len) { |
9367c22c445f
6983239: TreeScanner does not scan default value for method
jjg
parents:
5520
diff
changeset
|
213 |
JCTree t = (JCTree) tree; |
6601 | 214 |
String s = t.toString().replaceAll("\\s+", " "); |
4877
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
215 |
return (s.length() < len) ? s : s.substring(0, len); |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
216 |
} |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
217 |
|
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
218 |
/** Number of files that have been analyzed. */ |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
219 |
int fileCount; |
6597
9367c22c445f
6983239: TreeScanner does not scan default value for method
jjg
parents:
5520
diff
changeset
|
220 |
/** Number of trees that have been successfully compared. */ |
9367c22c445f
6983239: TreeScanner does not scan default value for method
jjg
parents:
5520
diff
changeset
|
221 |
int treeCount; |
4877
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
222 |
/** Number of errors reported. */ |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
223 |
int errors; |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
224 |
/** Flag: don't report irrelevant files. */ |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
225 |
boolean quiet; |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
226 |
/** Flag: report files as they are processed. */ |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
227 |
boolean verbose; |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
228 |
|
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
229 |
|
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
230 |
/** |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
231 |
* Thrown when errors are found parsing a java file. |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
232 |
*/ |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
233 |
private static class ParseException extends Exception { |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
234 |
ParseException(String msg) { |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
235 |
super(msg); |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
236 |
} |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
237 |
} |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
238 |
|
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
239 |
/** |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
240 |
* DiagnosticListener to report diagnostics and count any errors that occur. |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
241 |
*/ |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
242 |
private static class Reporter implements DiagnosticListener<JavaFileObject> { |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
243 |
Reporter(PrintWriter out) { |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
244 |
this.out = out; |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
245 |
} |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
246 |
|
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
247 |
public void report(Diagnostic<? extends JavaFileObject> diagnostic) { |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
248 |
out.println(diagnostic); |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
249 |
switch (diagnostic.getKind()) { |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
250 |
case ERROR: |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
251 |
errors++; |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
252 |
} |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
253 |
} |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
254 |
int errors; |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
255 |
PrintWriter out; |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
256 |
} |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
257 |
|
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
258 |
/** |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
259 |
* Get the set of fields for a tree node that may contain child tree nodes. |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
260 |
* These are the fields that are subtypes of JCTree or List. |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
261 |
* The results are cached, based on the tree's tag. |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
262 |
*/ |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
263 |
Set<Field> getFields(JCTree tree) { |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
264 |
Set<Field> fields = map.get(tree.getTag()); |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
265 |
if (fields == null) { |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
266 |
fields = new HashSet<Field>(); |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
267 |
for (Field f: tree.getClass().getFields()) { |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
268 |
Class<?> fc = f.getType(); |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
269 |
if (JCTree.class.isAssignableFrom(fc) || List.class.isAssignableFrom(fc)) |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
270 |
fields.add(f); |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
271 |
} |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
272 |
map.put(tree.getTag(), fields); |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
273 |
} |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
274 |
return fields; |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
275 |
} |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
276 |
// where |
10950 | 277 |
Map<JCTree.Tag, Set<Field>> map = new HashMap<JCTree.Tag,Set<Field>>(); |
4877
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
278 |
|
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
279 |
/** Get the line number for the primary position for a tree. |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
280 |
* The code is intended to be simple, although not necessarily efficient. |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
281 |
* However, note that a file manager such as JavacFileManager is likely |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
282 |
* to cache the results of file.getCharContent, avoiding the need to read |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
283 |
* the bits from disk each time this method is called. |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
284 |
*/ |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
285 |
int getLine(JavaFileObject file, JCTree tree) { |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
286 |
try { |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
287 |
CharSequence cs = file.getCharContent(true); |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
288 |
int line = 1; |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
289 |
for (int i = 0; i < tree.pos; i++) { |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
290 |
if (cs.charAt(i) == '\n') // jtreg tests always use Unix line endings |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
291 |
line++; |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
292 |
} |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
293 |
return line; |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
294 |
} catch (IOException e) { |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
295 |
return -1; |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
296 |
} |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
297 |
} |
b642d21c9f74
6923080: TreeScanner.visitNewClass should scan tree.typeargs
jjg
parents:
diff
changeset
|
298 |
} |