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:
Maxim Shafirov
2005-01-20 13:02:23 +03:00
parent d161b63133
commit 53cf00af4d

View File

@@ -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();