mosermw commented on PR #10107:
URL: https://github.com/apache/nifi/pull/10107#issuecomment-3109400593

   > I wanted to double check whether the logic in these classes are correct or 
perhaps they need to have break statements. 
   > 
   > * org.apache.nifi.controller.serialization.AffectedComponentSet after line 
550 there is no break statement.
   > * org.apache.nifi.processors.standard.ControlRate after line  280 there is 
no break statement.
   > * org.apache.nifi.processors.standard.TailFile after line 1034 there is no 
break statement.
   > * org.apache.nifi.authorization.StandardAuthorizableLookup after line 592 
there is no break statement.
   > 
   > Please advise. Thanks!
   
   I had a look at these:
   
   - I think AffectedComponentSet is missing a break statement there. I'm not 
sure the case ever happens, or if it does happen then falling through has no 
negative effects, but I think a break is intended.
   - For ControlRate it appears the fallthrough is intentional, because the 
"Maximum Rate" property must be filled in when using either of DATA_RATE, 
FLOWFILE_RATE or ATTRIBUTE_RATE.  Having a comment there is good to make that 
clear.
   - After reading the javadoc for TailFile, it appears the fallthrough is 
intentional.  Having a comment there is good to make that clear.
   - For StandardAuthorizableLookup, I don't think it's possible to reach the 
end of the case, because a return or thrown exception is the only path out.  
Having a break statement there probably won't hurt if it makes PMD happy.
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to