unused return value local inspection: don't treat void return types

This commit is contained in:
Dmitry Batkovich
2016-11-07 14:34:39 +03:00
parent d13c994af5
commit 5ff69b4d34
@@ -53,6 +53,7 @@ public class UnusedReturnValueLocalInspection extends BaseJavaLocalInspectionToo
@Override
public ProblemDescriptor[] checkMethod(@NotNull PsiMethod method, @NotNull InspectionManager manager, boolean isOnTheFly) {
if (method.isConstructor() ||
PsiType.VOID.equals(method.getReturnType()) ||
myGlobal.IGNORE_BUILDER_PATTERN && PropertyUtil.isSimplePropertySetter(method) ||
method.hasModifierProperty(PsiModifier.NATIVE)) return null;