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/eclipse | |
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/eclipse')
-rw-r--r-- | src/core/lombok/eclipse/EclipseImportList.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/core/lombok/eclipse/EclipseImportList.java b/src/core/lombok/eclipse/EclipseImportList.java index 6d60f5aa..9a04403d 100644 --- a/src/core/lombok/eclipse/EclipseImportList.java +++ b/src/core/lombok/eclipse/EclipseImportList.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013 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 @@ -45,6 +45,11 @@ public class EclipseImportList 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) { if (imports != null) { outer: for (ImportReference imp : imports) { @@ -54,7 +59,7 @@ public class EclipseImportList implements ImportList { int len = token.length; if (len != unqualified.length()) continue; for (int i = 0; i < len; i++) if (token[i] != unqualified.charAt(i)) continue outer; - return LombokInternalAliasing.processAliases(toQualifiedName(tokens)); + return toQualifiedName(tokens); } } return null; |