mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
micro-optimization in ModuleUtil.findModuleForPsiElement()
This commit is contained in:
@@ -125,6 +125,9 @@ public class ModuleUtil {
|
||||
if (orderEntries.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
if (orderEntries.size() == 1) {
|
||||
return orderEntries.get(0).getOwnerModule();
|
||||
}
|
||||
Set<Module> modules = new HashSet<Module>();
|
||||
for (OrderEntry orderEntry : orderEntries) {
|
||||
modules.add(orderEntry.getOwnerModule());
|
||||
|
||||
Reference in New Issue
Block a user