@Override public void checkEndOfExecution(CheckerContext context) { context.alwaysTrueOrFalseExpressions().alwaysTrue().forEach(tree -> { Tree statementParent = firstStatementParent(tree); if (statementParent != null && statementParent.is(Tree.Kind.WHILE_STATEMENT)) { checkLoopWithAlwaysTrueCondition(context, statementParent); } }); contexts.pop(); }
@Override public void checkEndOfExecution(CheckerContext context) { context.alwaysTrueOrFalseExpressions().alwaysTrue().forEach(tree -> { Tree statementParent = firstStatementParent(tree); if (statementParent != null && statementParent.is(Tree.Kind.WHILE_STATEMENT)) { checkLoopWithAlwaysTrueCondition(context, statementParent); } }); contexts.pop(); }
@Override public void checkEndOfExecution(CheckerContext context) { AlwaysTrueOrFalseExpressionCollector atof = context.alwaysTrueOrFalseExpressions(); for (Tree condition : atof.alwaysFalse()) { reportBooleanExpression(context, atof, condition, false); } for (Tree condition : atof.alwaysTrue()) { reportBooleanExpression(context, atof, condition, true); } }
@Override public void checkEndOfExecution(CheckerContext context) { AlwaysTrueOrFalseExpressionCollector atof = context.alwaysTrueOrFalseExpressions(); for (Tree condition : atof.alwaysFalse()) { reportBooleanExpression(context, atof, condition, false); } for (Tree condition : atof.alwaysTrue()) { reportBooleanExpression(context, atof, condition, true); } }
@Override public void checkEndOfExecution(CheckerContext context) { AlwaysTrueOrFalseExpressionCollector atof = context.alwaysTrueOrFalseExpressions(); for (Tree condition : atof.alwaysFalse()) { reportBooleanExpression(context, atof, condition, false); } for (Tree condition : atof.alwaysTrue()) { reportBooleanExpression(context, atof, condition, true); } }
@Override public void checkEndOfExecution(CheckerContext context) { AlwaysTrueOrFalseExpressionCollector atof = context.alwaysTrueOrFalseExpressions(); for (Tree condition : atof.alwaysFalse()) { reportBooleanExpression(context, atof, condition, false); } for (Tree condition : atof.alwaysTrue()) { reportBooleanExpression(context, atof, condition, true); } }