IDEA-CR-13662 Print lambda body if BoolUtils.getNegated() failed

This commit is contained in:
Tagir Valeev
2016-09-13 11:02:23 +07:00
parent 256823f66a
commit 7f7bc374b8
@@ -913,7 +913,7 @@ public class StreamApiMigrationInspection extends BaseJavaBatchLocalInspectionTo
PsiElement lambdaBody = lambda.getBody();
if(lambdaBody instanceof PsiExpression && BoolUtils.isNegation((PsiExpression)lambdaBody)) {
PsiExpression negated = BoolUtils.getNegated((PsiExpression)lambdaBody);
LOG.assertTrue(negated != null);
LOG.assertTrue(negated != null, lambdaBody.getText());
String methodReferenceText = LambdaCanBeMethodReferenceInspection
.convertToMethodReference(negated, lambda.getParameterList().getParameters(), lambda.getFunctionalInterfaceType(), lambda);
if(methodReferenceText != null) {