Kevin Doran created NIFI-15678:
----------------------------------

             Summary: Relax PMD rules related to switch statements in nifi
                 Key: NIFI-15678
                 URL: https://issues.apache.org/jira/browse/NIFI-15678
             Project: Apache NiFi
          Issue Type: Task
            Reporter: Kevin Doran
            Assignee: Kevin Doran


We have some rules that are tricky to adhere to such as 
ExhaustiveSwitchHasDefault because the enums they operate on come from upstream 
nifi-api repository, which should be decoupled from nifi. If a developer wants 
to add a default to an exhastive switch, it is good defensive programming 
because a bump in dependency for nifi-api could result in a switch statement 
that was previous exhaustive no longer being exhaustive, and if there is a 
reasonable default, that is preferable to having to make code changes every 
time the api changes.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to