[ 
https://issues.apache.org/jira/browse/NIFI-16491?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Daniel Stieglitz updated NIFI-16491:
------------------------------------
    Description: 
NIFI-16119 helped simplify assertions based on an Intellij analyze rule but 
there was no way to enforce reintroducing the use of non simple assertions. 
Hence there is no surprise NIFI-16484 had to address other assertions which 
could be simplified. PMD already has a SimplifiableTestAssertion rule but it 
does not cover all cases such as the use of assertTrue(a instanceof A) instead 
of assertInstanceOf(a, A.class); 
An issue has already been submitted to PMD 
https://github.com/pmd/pmd/issues/7119 which requests to expand 
SimplifiableTestAssertion with the above case and other scenarios. 
The purpose of this ticket is to track those changes and make sure NIFI 
upgrades to the next version 7.29.0 of PMD which has the fix for this.

  was:
NIFI-16119 helped simplify assertions based on an Intellij analyze rule but 
there was no way to enforce reintroducing the use of non simple assertions. 
Hence there is no surprise NIFI-16484 had to address other assertions which 
could be simplified. PMD already has a SimplifiableTestAssertion rule but it 
does not cover all cases such as the use of assertTrue(a instanceof A) instead 
of assertInstanceOf(a, A.class); 
An issue has already been submitted to PMD 
https://github.com/pmd/pmd/issues/7119 which requests to expand 
SimplifiableTestAssertion with the above case and other scenarios. 
The purpose of this ticket is to track those changes and make sure NIFI 
upgrades to the next version of PMD which has the fix for this.


> Have PMD rule for enforcing the use of  assertInstanceOf instead of 
> assertTrue(a instanceof A)
> ----------------------------------------------------------------------------------------------
>
>                 Key: NIFI-16491
>                 URL: https://issues.apache.org/jira/browse/NIFI-16491
>             Project: Apache NiFi
>          Issue Type: Improvement
>            Reporter: Daniel Stieglitz
>            Priority: Minor
>
> NIFI-16119 helped simplify assertions based on an Intellij analyze rule but 
> there was no way to enforce reintroducing the use of non simple assertions. 
> Hence there is no surprise NIFI-16484 had to address other assertions which 
> could be simplified. PMD already has a SimplifiableTestAssertion rule but it 
> does not cover all cases such as the use of assertTrue(a instanceof A) 
> instead of assertInstanceOf(a, A.class); 
> An issue has already been submitted to PMD 
> https://github.com/pmd/pmd/issues/7119 which requests to expand 
> SimplifiableTestAssertion with the above case and other scenarios. 
> The purpose of this ticket is to track those changes and make sure NIFI 
> upgrades to the next version 7.29.0 of PMD which has the fix for this.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to