Skip to content

Commit

Permalink
Fix quality flaw: Move invariant to the correct place.
Browse files Browse the repository at this point in the history
  • Loading branch information
benzonico committed Feb 1, 2017
1 parent 8c313a7 commit f5a869c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ public ProgramState checkPostStatement(CheckerContext context, Tree syntaxNode)

private static List<ProgramState> setNullConstraint(CheckerContext context, Tree syntaxNode) {
SymbolicValue val = context.getState().peekValue();
Preconditions.checkNotNull(val);
if (syntaxNode.is(Tree.Kind.METHOD_INVOCATION) && isAnnotatedCheckForNull((MethodInvocationTree) syntaxNode)) {
Preconditions.checkNotNull(val);
List<ProgramState> states = new ArrayList<>();
states.addAll(val.setConstraint(context.getState(), ObjectConstraint.nullConstraint()));
states.addAll(val.setConstraint(context.getState(), ObjectConstraint.notNull()));
Expand Down

0 comments on commit f5a869c

Please sign in to comment.