Details
Description
It appears that validation of configuration properties is performed in the ConsumerConfig and ProducerConfig constructors. This is generally bad practice as it couples object construction and validation. It also makes it difficult to mock these objects in unit tests.
Ideally validation of the configuration properties should be separated from object construction and initiated by those that rely/use these config objects.
http://misko.hevery.com/code-reviewers-guide/flaw-constructor-does-real-work/