Fix the fix for #1340

This commit is contained in:
albfernandez
2016-02-27 13:06:15 +01:00
committed by Andreas Dangel
parent 3c0516b86f
commit 40bf82244f

View File

@ -58,10 +58,7 @@ public class UseStringBufferForStringAppendsRule extends AbstractJavaRule {
addViolation(data, assignmentOperator);
}
} else if(astName.getImage().equals(name.getImage())){
ASTAssignmentOperator assignmentOperator = statement.getFirstDescendantOfType(ASTAssignmentOperator.class);
if (astName.jjtGetParent().jjtGetParent().jjtGetParent().getClass() == ASTEqualityExpression.class) {
continue;
}
ASTAssignmentOperator assignmentOperator = statement.getFirstDescendantOfType(ASTAssignmentOperator.class);
if (assignmentOperator != null && !assignmentOperator.isCompound()) {
addViolation(data, astName);
}