getProbableFQTypes now correctly assumes there's a hidden 'import java.lang.*;' at the end of any source file's import list.

This commit is contained in:
Reinier Zwitserloot committed 2009-12-17 16:35:33 +01:00
1 parent 61b054d787
commit 63dca5d3e9
1 file changed
+3 -1
+3 -1
View File
@@ -425,7 +425,9 @@ public class AnnotationValues<A extends Annotation> {
}
/* 3. Walk through star imports and, if they start with "java.", use Class.forName based resolution. */ {
for (String im : ast.getImportStatements()) {
List<String> imports = new ArrayList<String>(ast.getImportStatements());
imports.add("java.lang.*");
for (String im : imports) {
if (!im.endsWith(".*") || !im.startsWith("java.")) continue;
try {
Class<?> c = Class.forName(im.substring(0, im.length()-1) + typeName);