|
|
|
@ -53,15 +53,12 @@ public class InputSQLVerifyChecker extends IssuableSubscriptionVisitor { |
|
|
|
|
@Override |
|
|
|
|
public void visitIfStatement(IfStatementTree tree) { |
|
|
|
|
ExpressionTree condition = tree.condition(); |
|
|
|
|
if(condition instanceof MethodInvocationTree){ |
|
|
|
|
MethodInvocationTree methodInvocationTree = (MethodInvocationTree) condition; |
|
|
|
|
ExpressionTree expressionTree = methodInvocationTree.methodSelect(); |
|
|
|
|
if(expressionTree instanceof MemberSelectExpressionTreeImpl){ |
|
|
|
|
MemberSelectExpressionTreeImpl memberSelectExpressionTree = (MemberSelectExpressionTreeImpl) expressionTree; |
|
|
|
|
//将if判断中的参数存入集合中
|
|
|
|
|
lists.add(memberSelectExpressionTree.expression().toString()); |
|
|
|
|
} |
|
|
|
|
condition.accept(new BaseTreeVisitor(){ |
|
|
|
|
@Override |
|
|
|
|
public void visitIdentifier(IdentifierTree tree) { |
|
|
|
|
lists.add(tree.name()); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|