-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue #849: bump pmd to version 8.35 #850
Conversation
@@ -60,16 +60,16 @@ | |||
test method. | |||
CheckstyleRegressionTest is not a test. --> | |||
<property name="violationSuppressXPath" | |||
value="//ClassOrInterfaceDeclaration[@Image='AllChecksTest' | |||
or @Image='CheckstyleRegressionTest']"/> | |||
value="//ClassOrInterfaceDeclaration[@SimpleName='AllChecksTest' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All Image
attributes should be replaced with SimpleName
after PMD 6.22:
https://javadoc.io/static/net.sourceforge.pmd/pmd-java/6.22.0/net/sourceforge/pmd/lang/java/ast/ASTAnyTypeDeclaration.html#getImage()
@@ -480,7 +480,7 @@ | |||
<limit> | |||
<counter>LINE</counter> | |||
<value>COVEREDRATIO</value> | |||
<minimum>0.98</minimum> | |||
<minimum>0.97</minimum> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The coverage is unchanged. Replacing String result = null;
with final String result;
reduces the size of the method, thus the covered percentage changes from 0.98 to 0.979
@@ -67,7 +67,7 @@ | |||
/** | |||
* Field is array of default target constant types. | |||
*/ | |||
private int[] targetConstantTypes = new int[] { | |||
private int[] targetConstantTypes = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -213,7 +213,7 @@ private static boolean isContainsCaughtExc(List<DetailAST> throwParamNamesList, | |||
} | |||
|
|||
if (temp.getType() == TokenTypes.ASSIGN) { | |||
DetailAST convertedExc = null; | |||
final DetailAST convertedExc; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -338,9 +338,9 @@ private static DetailAST getRedundantReturnInBlock(DetailAST statementAst) { | |||
*/ | |||
private static DetailAST findRedundantReturnInCatch(DetailAST lastStatementInCatchBlockAst) { | |||
DetailAST redundantReturnAst = null; | |||
DetailAST currentNodeAst = lastStatementInCatchBlockAst; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The variable currentNodeAst
removed as it is just a confusing alias for lastStatementInCatchBlockAst
.
} | ||
|
||
currentNodeAst = SevntuUtil.getNextSubTreeNode(currentNodeAst, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line removed as getNextSubTreeNode
is read-only method and this statement does nothing.
PMD complains for unused variable here.
Issue #849
Update PMD to the most recent version.
Regression report (to be extra sure): https://pbludov.github.io/issue-849-pmd-6.35/