mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-04 23:39:07 +07:00
void methods should be ignored regardless the fact they match patterns defined. Otherwise String.getChars() method is being highlighted with default patterns.
This commit is contained in:
@@ -131,6 +131,11 @@ public class IgnoreResultOfCallInspection extends ExpressionInspection {
|
||||
return;
|
||||
}
|
||||
|
||||
final PsiType retType = method.getReturnType();
|
||||
if (retType == PsiType.VOID) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (Iterator iterator = callsToCheck.iterator(); iterator.hasNext();) {
|
||||
final ReturnCheckSpecification spec = (ReturnCheckSpecification) iterator.next();
|
||||
final Pattern methodNamePattern = spec.getMethodNamePattern();
|
||||
|
||||
Reference in New Issue
Block a user