private void processUnclosedSymbolicValue(ExplodedGraph.Node node, SymbolicValue sv) { FlowComputation.flowWithoutExceptions(node, sv, OPEN::equals, RESOURCE_CONSTRAINT_DOMAIN).stream() .flatMap(Flow::firstFlowLocation) .filter(location -> location.syntaxNode.is(Tree.Kind.NEW_CLASS, Tree.Kind.METHOD_INVOCATION)) .forEach(this::reportIssue); }
private void processUnclosedSymbolicValue(ExplodedGraph.Node node, SymbolicValue sv) { List<Class<? extends Constraint>> domains = Lists.newArrayList(CustomResourceConstraint.class); FlowComputation.flowWithoutExceptions(node, sv, OPENED::equals, domains).stream() .flatMap(Flow::firstFlowLocation) .filter(location -> location.syntaxNode.is(Tree.Kind.NEW_CLASS, Tree.Kind.METHOD_INVOCATION)) .forEach(this::reportIssue); }
private void processUnclosedSymbolicValue(ExplodedGraph.Node node, SymbolicValue sv) { FlowComputation.flowWithoutExceptions(node, sv, OPEN::equals, RESOURCE_CONSTRAINT_DOMAIN).stream() .flatMap(Flow::firstFlowLocation) .filter(location -> location.syntaxNode.is(Tree.Kind.NEW_CLASS, Tree.Kind.METHOD_INVOCATION)) .forEach(this::reportIssue); }
private void processUnclosedSymbolicValue(ExplodedGraph.Node node, SymbolicValue sv) { List<Class<? extends Constraint>> domains = Lists.newArrayList(CustomResourceConstraint.class); FlowComputation.flowWithoutExceptions(node, sv, OPENED::equals, domains).stream() .flatMap(Flow::firstFlowLocation) .filter(location -> location.syntaxNode.is(Tree.Kind.NEW_CLASS, Tree.Kind.METHOD_INVOCATION)) .forEach(this::reportIssue); }
@Override public void checkEndOfExecutionPath(CheckerContext context, ConstraintManager constraintManager) { if (context.getState().exitingOnRuntimeException()) { return; } ExplodedGraph.Node node = context.getNode(); context.getState().getValuesWithConstraints(LockConstraint.LOCKED).stream() .flatMap(lockedSv -> FlowComputation.flowWithoutExceptions(node, lockedSv, LockConstraint.LOCKED::equals, LockConstraint.UNLOCKED::equals, LOCK_CONSTRAINT_DOMAIN).stream()) .flatMap(Flow::firstFlowLocation) .forEach(this::reportIssue); }
@Override public void checkEndOfExecutionPath(CheckerContext context, ConstraintManager constraintManager) { if (context.getState().exitingOnRuntimeException()) { return; } ExplodedGraph.Node node = context.getNode(); context.getState().getValuesWithConstraints(LockConstraint.LOCKED).stream() .flatMap(lockedSv -> FlowComputation.flowWithoutExceptions(node, lockedSv, LockConstraint.LOCKED::equals, LockConstraint.UNLOCKED::equals, LOCK_CONSTRAINT_DOMAIN).stream()) .flatMap(Flow::firstFlowLocation) .forEach(this::reportIssue); }