diff options
author | Reinier Zwitserloot <reinier@tipit.to> | 2009-12-17 16:35:33 +0100 |
---|---|---|
committer | Reinier Zwitserloot <reinier@tipit.to> | 2009-12-17 16:35:33 +0100 |
commit | 63dca5d3e9c029de156d73f7ed6df1d4ec46de71 (patch) | |
tree | d27d515e16997c98401414520a5bcd3ac0eb8b5c | |
parent | 61b054d78784f27be5420474af4ccb047e1668cc (diff) | |
download | lombok-63dca5d3e9c029de156d73f7ed6df1d4ec46de71.tar.gz lombok-63dca5d3e9c029de156d73f7ed6df1d4ec46de71.tar.bz2 lombok-63dca5d3e9c029de156d73f7ed6df1d4ec46de71.zip |
getProbableFQTypes now correctly assumes there's a hidden 'import java.lang.*;' at the end of any source file's import list.
-rw-r--r-- | src/core/lombok/core/AnnotationValues.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/lombok/core/AnnotationValues.java b/src/core/lombok/core/AnnotationValues.java index 85cae5c2..db4c6d09 100644 --- a/src/core/lombok/core/AnnotationValues.java +++ b/src/core/lombok/core/AnnotationValues.java @@ -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); |