diff options
author | Reinier Zwitserloot <r.zwitserloot@projectlombok.org> | 2019-09-12 23:17:05 +0200 |
---|---|---|
committer | Reinier Zwitserloot <r.zwitserloot@projectlombok.org> | 2019-09-12 23:17:05 +0200 |
commit | 538d2bd690b6288728cc8516bcb3c8093bf2acc6 (patch) | |
tree | 5e84527bd8b248307a39573ae5b0efde37f0e1b4 /src/core/lombok/javac | |
parent | 5cceda7de97d1c761bb979433a5ae793668d1110 (diff) | |
download | lombok-538d2bd690b6288728cc8516bcb3c8093bf2acc6.tar.gz lombok-538d2bd690b6288728cc8516bcb3c8093bf2acc6.tar.bz2 lombok-538d2bd690b6288728cc8516bcb3c8093bf2acc6.zip |
Refactored how the type resolver deals with aliases; fixes star import issues.
Diffstat (limited to 'src/core/lombok/javac')
-rw-r--r-- | src/core/lombok/javac/JavacImportList.java | 7 | ||||
-rw-r--r-- | src/core/lombok/javac/handlers/JavacSingularsRecipes.java | 4 |
2 files changed, 3 insertions, 8 deletions
diff --git a/src/core/lombok/javac/JavacImportList.java b/src/core/lombok/javac/JavacImportList.java index 468d8c7b..8de61afc 100644 --- a/src/core/lombok/javac/JavacImportList.java +++ b/src/core/lombok/javac/JavacImportList.java @@ -60,11 +60,6 @@ public class JavacImportList implements ImportList { if (pkgStr != null && pkgStr.equals(packageName)) return true; if ("java.lang".equals(packageName)) return true; - if (pkgStr != null) { - Collection<String> extra = LombokInternalAliasing.IMPLIED_EXTRA_STAR_IMPORTS.get(pkgStr); - if (extra != null && extra.contains(packageName)) return true; - } - for (JCTree def : defs) { if (!(def instanceof JCImport)) continue; if (((JCImport) def).staticImport) continue; @@ -74,8 +69,6 @@ public class JavacImportList implements ImportList { if (!"*".equals(simpleName)) continue; String starImport = ((JCFieldAccess) qual).selected.toString(); if (packageName.equals(starImport)) return true; - Collection<String> extra = LombokInternalAliasing.IMPLIED_EXTRA_STAR_IMPORTS.get(starImport); - if (extra != null && extra.contains(packageName)) return true; } return false; diff --git a/src/core/lombok/javac/handlers/JavacSingularsRecipes.java b/src/core/lombok/javac/handlers/JavacSingularsRecipes.java index 341d44df..fa384df3 100644 --- a/src/core/lombok/javac/handlers/JavacSingularsRecipes.java +++ b/src/core/lombok/javac/handlers/JavacSingularsRecipes.java @@ -101,7 +101,9 @@ public class JavacSingularsRecipes { } public String toQualified(String typeReference) { - return singularizableTypes.toQualified(typeReference); + java.util.List<String> q = singularizableTypes.toQualifieds(typeReference); + if (q.isEmpty()) return null; + return q.get(0); } public JavacSingularizer getSingularizer(String fqn, JavacNode node) { |