PMD Rule:OneDeclarationPerLine Priority:4 Use one line for each declaration, it enhances code readability. Issue #744

This commit is contained in:
Roman Ivanov 2015-04-22 17:05:31 -04:00
parent 280807188a
commit bc9eae330a
2 changed files with 2 additions and 2 deletions

View File

@ -73,7 +73,6 @@
<exclude name="DataflowAnomalyAnalysis"/>
<!-- turning local varibles to fields create design problems and extend scope of variable -->
<exclude name="AvoidFinalLocalVariable"/>
<exclude name="OneDeclarationPerLine"/>
<exclude name="AvoidPrefixingMethodParameters"/>
<exclude name="AvoidLiteralsInIfCondition"/>
<!-- Checkstyle is not thread safe -->

View File

@ -289,7 +289,8 @@ public class SuppressWarningsHolder
final int firstLine = targetAST.getLineNo();
final int firstColumn = targetAST.getColumnNo();
final DetailAST nextAST = targetAST.getNextSibling();
final int lastLine, lastColumn;
final int lastLine;
final int lastColumn;
if (nextAST != null) {
lastLine = nextAST.getLineNo();
lastColumn = nextAST.getColumnNo() - 1;