Add Boolean? == const to elvis conversion and vice versa #KT-15368 Fixed

Convert elvis to equality check implemented as inspection due
code style guide
This commit is contained in:
Dimach
2017-06-10 02:39:48 +03:00
committed by Mikhail Glukhikh
parent 6e9c0a0fda
commit d369fa094a
36 changed files with 437 additions and 1 deletions
@@ -316,7 +316,7 @@ public class KtPsiUtil {
return isBooleanConstant(condition) && condition.getNode().findChildByType(KtTokens.FALSE_KEYWORD) != null;
}
private static boolean isBooleanConstant(@Nullable KtExpression condition) {
public static boolean isBooleanConstant(@Nullable KtExpression condition) {
return condition != null && condition.getNode().getElementType() == KtNodeTypes.BOOLEAN_CONSTANT;
}