Skip to content
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

Merged
merged 1 commit into from
Jun 12, 2021

Conversation

pbludov
Copy link
Contributor

@pbludov pbludov commented Jun 12, 2021

Issue #849

Update PMD to the most recent version.

Regression report (to be extra sure): https://pbludov.github.io/issue-849-pmd-6.35/

@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 98.797% when pulling b5f379a on pbludov:issue-849-pmd-6.35 into 96cac81 on sevntu-checkstyle:master.

@@ -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'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -480,7 +480,7 @@
<limit>
<counter>LINE</counter>
<value>COVEREDRATIO</value>
<minimum>0.98</minimum>
<minimum>0.97</minimum>
Copy link
Contributor Author

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 = {
Copy link
Contributor Author

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;
Copy link
Contributor Author

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;
Copy link
Contributor Author

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,
Copy link
Contributor Author

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.

@romani romani merged commit 9deadf0 into sevntu-checkstyle:master Jun 12, 2021
@pbludov pbludov deleted the issue-849-pmd-6.35 branch June 12, 2021 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants