mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-14 00:16:47 +00:00
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:
1 parent
61b054d787
commit
63dca5d3e9
1 file changed
+3
-1
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user