mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
EA-39157 Groovy allows empty method names
This commit is contained in:
@@ -59,8 +59,7 @@ public class MethodUsagesSearcher extends QueryExecutorBase<PsiReference, Method
|
||||
|
||||
final String textToSearch = method.getName();
|
||||
if (StringUtil.isEmpty(textToSearch)) {
|
||||
PsiFile file = aClass.getContainingFile();
|
||||
LOG.error("Cannot search for the method with empty name: "+method+"; class:"+aClass+"; file: "+ file+"; "+(file == null ? null : file.getVirtualFile()));
|
||||
return;
|
||||
}
|
||||
final PsiMethod[] methods = strictSignatureSearch ? new PsiMethod[]{method} : aClass.findMethodsByName(textToSearch, false);
|
||||
|
||||
|
||||
+2
@@ -19,6 +19,7 @@ package org.jetbrains.plugins.groovy.findUsages;
|
||||
import com.intellij.openapi.application.QueryExecutorBase;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.roots.ProjectRootManager;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.PsiFile;
|
||||
@@ -72,6 +73,7 @@ public class MethodLateBoundReferencesSearcher extends QueryExecutorBase<PsiRefe
|
||||
|
||||
|
||||
private static void orderSearching(SearchScope searchScope, final String name, @NotNull SearchRequestCollector collector, final int paramCount) {
|
||||
if (StringUtil.isEmpty(name)) return;
|
||||
collector.searchWord(name, searchScope, UsageSearchContext.IN_CODE, true, new RequestResultProcessor("groovy.lateBound") {
|
||||
@Override
|
||||
public boolean processTextOccurrence(PsiElement element, int offsetInElement, Processor<PsiReference> consumer) {
|
||||
|
||||
Reference in New Issue
Block a user