EndzeitBegins commented on PR #8211:
URL: https://github.com/apache/nifi/pull/8211#issuecomment-1892742398

   Thanks for the questions @exceptionfactory.
   First of all I agree that it should be preferred to let the enums implement 
`DescribedValue` whenever feasible.
   Maybe that's something worth to better highlight in the code documentation. 
   
   In particular I thought about two situations, where the more adaptive 
approach introduced in this PR would be beneficial.
   1. There might be cases we're an existing enum (e.g. from a library) is used 
that cannot be altered. Even though I'd personally prefer creating one's own 
enum (implementing DescribedValue) that maps to the library one (similar to the 
azure bundle) I can see how someone might not want to go "the extra mile".
   2. And by far more important to me, I noticed that when using the existing 
`public <E extends Enum<E>> Builder allowableValues(final E[] values)` with an 
enum that actually implements DescribedValue, those values will be ignored, 
which might come as a surprise. 


-- 
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: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to