diff options
author | Reinier Zwitserloot <r.zwitserloot@projectlombok.org> | 2020-01-31 04:42:05 +0100 |
---|---|---|
committer | Reinier Zwitserloot <r.zwitserloot@projectlombok.org> | 2020-01-31 04:42:05 +0100 |
commit | d31182c4383a5ccc499862d2a8035d49e5202319 (patch) | |
tree | ddfb30ece5140587aed9ddd7dc0e248fb2ac30ec /src/core/lombok/javac | |
parent | 6e2b5802beded1dc3c965d18ecda7f3d90b7e761 (diff) | |
download | lombok-d31182c4383a5ccc499862d2a8035d49e5202319.tar.gz lombok-d31182c4383a5ccc499862d2a8035d49e5202319.tar.bz2 lombok-d31182c4383a5ccc499862d2a8035d49e5202319.zip |
[fixes #2235] aliasing the old wither to the new one was broken for explicit imports.
Diffstat (limited to 'src/core/lombok/javac')
-rw-r--r-- | src/core/lombok/javac/JavacImportList.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/core/lombok/javac/JavacImportList.java b/src/core/lombok/javac/JavacImportList.java index 8de61afc..d498c2ab 100644 --- a/src/core/lombok/javac/JavacImportList.java +++ b/src/core/lombok/javac/JavacImportList.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013-2015 The Project Lombok Authors. + * Copyright (C) 2013-2020 The Project Lombok Authors. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -43,13 +43,18 @@ public class JavacImportList implements ImportList { } @Override public String getFullyQualifiedNameForSimpleName(String unqualified) { + String q = getFullyQualifiedNameForSimpleNameNoAliasing(unqualified); + return q == null ? null : LombokInternalAliasing.processAliases(q); + } + + @Override public String getFullyQualifiedNameForSimpleNameNoAliasing(String unqualified) { for (JCTree def : defs) { if (!(def instanceof JCImport)) continue; JCTree qual = ((JCImport) def).qualid; if (!(qual instanceof JCFieldAccess)) continue; String simpleName = ((JCFieldAccess) qual).name.toString(); if (simpleName.equals(unqualified)) { - return LombokInternalAliasing.processAliases(qual.toString()); + return qual.toString(); } } |