fix(lsp/java): empty imports allows classes from same package to be imported with completion items

This commit is contained in:
Akash Yadav
2023-04-09 19:22:58 +05:30
parent c1d1760572
commit 23c30eeaeb
3 changed files with 19 additions and 2 deletions
+17
View File
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="deploymentTargetDropDown">
<runningDeviceTargetSelectedWithDropDown>
<Target>
<type value="RUNNING_DEVICE_TARGET" />
<deviceKey>
<Key>
<type value="SERIAL_NUMBER" />
<value value="b36e6c44" />
</Key>
</deviceKey>
</Target>
</runningDeviceTargetSelectedWithDropDown>
<timeTargetWasSelectedWithDropDown value="2023-04-09T13:43:12.625854159Z" />
</component>
</project>
Binary file not shown.
@@ -62,8 +62,8 @@ public class EditHelper {
}
public static boolean containsImport(@NonNull Path file, Set<String> imports, String className) {
if (imports == null || imports.isEmpty()) {
return false;
if (imports == null) {
imports = Collections.emptySet();
}
final String pkgName = Extractors.packageName(className);