[
https://issues.apache.org/jira/browse/NIFI-14775?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18009326#comment-18009326
]
Daniel Stieglitz commented on NIFI-14775:
-----------------------------------------
[~exceptionfactory] Would you be okay if we still use this rule but exclude
from this rule the check on try with resources that use final? I was able to
write the correct xpath query to exclude this using the violationSuppressXPath
property. Full syntax is below.
{code:java}
<rule ref="category/java/codestyle.xml/UnnecessaryModifier">
<properties>
<property name="violationSuppressXPath"
value="./ancestor::ResourceList/Resource/LocalVariableDeclaration/ModifierList[contains(@ExplicitModifiers,
'final')]"/>
</properties>
</rule>{code}
> Implement PMD rule UnnecessaryModifier
> --------------------------------------
>
> Key: NIFI-14775
> URL: https://issues.apache.org/jira/browse/NIFI-14775
> Project: Apache NiFi
> Issue Type: Improvement
> Reporter: Daniel Stieglitz
> Assignee: Daniel Stieglitz
> Priority: Minor
>
> NIFI-14771 addressed the removal of public static final modifiers from
> interfaces. PMD rule UnnecessaryModifier will help enforce this moving
> forward.
> More details regarding this rule can be found at
> https://pmd.github.io/pmd/pmd_rules_java_codestyle.html#unnecessarymodifier
--
This message was sent by Atlassian Jira
(v8.20.10#820010)