@Override
 public void visitAssignmentExpression(AssignmentExpressionTree tree) {
   if (tree.variable().is(Tree.Kind.IDENTIFIER)) {
     checkIdentifier((IdentifierTree) tree.variable());
   }
   super.visitAssignmentExpression(tree);
 }
 @Override
 public void visitAssignmentExpression(AssignmentExpressionTree tree) {
   // skip writing to a variable.
   if (!tree.variable().is(Tree.Kind.IDENTIFIER)) {
     scan(tree.variable());
   }
   scan(tree.expression());
 }
예제 #3
0
 @Override
 public void visitAssignmentExpression(AssignmentExpressionTree tree) {
   Tree assignedVariable = getAssignedVariable(tree.variable());
   if (assignedVariable != null) {
     type = getTypeFromExpression(assignedVariable);
   }
 }
 @Override
 public void visitAssignmentExpression(AssignmentExpressionTree syntaxNode) {
   final ExpressionTree variable = syntaxNode.variable();
   if (variable.is(Tree.Kind.ARRAY_ACCESS_EXPRESSION)) {
     List<SymbolicValue> stackedValues = programState.peekValues(2);
     SymbolicValue value = stackedValues.get(1);
     programState = closeResource(programState, value);
   }
 }
 @Override
 public void visitAssignmentExpression(AssignmentExpressionTree tree) {
   super.visitAssignmentExpression(tree);
   if (isFileCreateTempFile(tree.expression())) {
     ExpressionTree variable = tree.variable();
     if (variable.is(Tree.Kind.IDENTIFIER) && !symbolStack.isEmpty()) {
       symbolStack.peek().put(((IdentifierTree) variable).symbol(), State.CREATE_TMP_FILE);
     }
   }
 }
 @Override
 public void visitAssignmentExpression(AssignmentExpressionTree tree) {
   Type wrapper = ((JavaType) tree.expression().symbolType()).primitiveWrapperType();
   if (tree.is(Kind.PLUS_ASSIGNMENT)
       && tree.variable().symbolType().is("java.lang.String")
       && wrapper != null) {
     createIssue(tree, wrapper.name());
   }
   super.visitAssignmentExpression(tree);
 }
예제 #7
0
 private void buildAssignment(AssignmentExpressionTree tree) {
   currentBlock.elements.add(tree);
   build(tree.variable());
   build(tree.expression());
 }