ctubbsii commented on pull request #1917: URL: https://github.com/apache/accumulo/pull/1917#issuecomment-776882511
> > Okay, cool. So, we throw the IAE on `build()`. I do think it would make more sense on `to()`, at the time the incorrect argument is actually provided. (See my PR to your PR at [milleruntime#15](https://github.com/milleruntime/accumulo/pull/15)) > > Do we want to make this change in a bug fix version? I think so. It doesn't change the overall behavior... just makes it slightly better, and it would be accompanied by the corresponding javadoc clarification. It's a slightly better user experience to have an argument failure at the time the argument is provided. > Also, what is the benefit of also throwing on the `to()` method when users have to always call `build()` and will typically in the same line of code? Fast(er)-failure, and easier to debug the specific argument for the specific method that failed. Even if they don't do anything more complex to debug than view the line number in the stack trace, not everybody formats their chained methods on a single line. So, this can make the line number from the stack trace more useful. But, not everybody will call build right away either, so it helps even more in those cases. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected]
