nbali edited a comment on pull request #16909:
URL: https://github.com/apache/beam/pull/16909#issuecomment-1057549098


   @TheNeuralBit 
   1. What is the problem with reflection?
   2. A unit test (`testKafkaIOReadPropertiesEnumValuePresence`) fails if a 
property is missing from that enum, so it is already enforced that there can be 
no new property introduced without taking care of that enum value as well.
   3. That is missing, indeed. I did not want to "pollute" the original class, 
but if the goal would be that then it would require a mandatory annotation on 
the properties itself instead of an enum elsewhere. Still that won't work 
"properly" as developers use the `withX` methods not the properties itself, 
also in many cases there is no 1-to-1 mapping between setters and withers (for 
example `withKeyDeserializerAndCoder`, `withDynamicRead`, etc). On the other 
hand the current implementation already provides a descriptive error message, 
so they can exactly know what is the problem on the very first run without even 
a deployment.


-- 
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