forked from phoedos/pmd
Remove TryStatement from parent blocks
- We should treat appends over the try edge as consecutive, it's only catch / finally that maye break the linear execution flow
This commit is contained in:
@ -28,7 +28,6 @@ import net.sourceforge.pmd.lang.java.ast.ASTPrimaryExpression;
|
||||
import net.sourceforge.pmd.lang.java.ast.ASTPrimarySuffix;
|
||||
import net.sourceforge.pmd.lang.java.ast.ASTSwitchLabel;
|
||||
import net.sourceforge.pmd.lang.java.ast.ASTSwitchStatement;
|
||||
import net.sourceforge.pmd.lang.java.ast.ASTTryStatement;
|
||||
import net.sourceforge.pmd.lang.java.ast.ASTVariableDeclaratorId;
|
||||
import net.sourceforge.pmd.lang.java.ast.ASTVariableInitializer;
|
||||
import net.sourceforge.pmd.lang.java.ast.ASTWhileStatement;
|
||||
@ -77,7 +76,6 @@ public class ConsecutiveLiteralAppendsRule extends AbstractJavaRule {
|
||||
BLOCK_PARENTS.add(ASTIfStatement.class);
|
||||
BLOCK_PARENTS.add(ASTSwitchStatement.class);
|
||||
BLOCK_PARENTS.add(ASTMethodDeclaration.class);
|
||||
BLOCK_PARENTS.add(ASTTryStatement.class);
|
||||
BLOCK_PARENTS.add(ASTCatchStatement.class);
|
||||
BLOCK_PARENTS.add(ASTFinallyStatement.class);
|
||||
}
|
||||
|
Reference in New Issue
Block a user