replace primitive == comparisons with .equals

This commit is contained in:
Anna Kozlova
2015-11-06 18:18:57 +01:00
parent ed6044e6ff
commit 911100e0b5
77 changed files with 120 additions and 126 deletions

View File

@@ -251,7 +251,7 @@ public class RefJavaUtilImpl extends RefJavaUtil{
if (refExpression instanceof PsiMethodReferenceExpression) {
PsiType returnType = psiMethod.getReturnType();
if (!psiMethod.isConstructor() && returnType != PsiType.VOID) {
if (!psiMethod.isConstructor() && !PsiType.VOID.equals(returnType)) {
refMethod.setReturnValueUsed(true);
addTypeReference(psiFrom, returnType, refFrom.getRefManager());
}
@@ -263,7 +263,7 @@ public class RefJavaUtilImpl extends RefJavaUtil{
);
if (call != null) {
PsiType returnType = psiMethod.getReturnType();
if (!psiMethod.isConstructor() && returnType != PsiType.VOID) {
if (!psiMethod.isConstructor() && !PsiType.VOID.equals(returnType)) {
if (!(call.getParent() instanceof PsiExpressionStatement)) {
refMethod.setReturnValueUsed(true);
}