MINOR: Catch null pointer exception for empty leader URL when assignment is null #4798
kkonstantine left a comment
I left a few minor comments to improve the exception message and the readability of the code.
Finally, an observation I have is that we now throw an exception which we know it should (and will) be caught right below. Another way to write this, would be to pass the exception to
Since this is not expected to have an impact on the efficiency of the code here, this is more of a stylistic comment than anything else. Up to you @asdf2014
…signment is null * Using more informative exception instead of `NullPointerException` * Using isEmpty instead of `lenght == 0` * Add brackets for if clause and improve the connect exception message
…signment is null (apache#4798) Catch null pointer exception for empty leader URL when assignment is null. Reviewers: Randall Hauch <firstname.lastname@example.org>, Konstantine Karantasis <email@example.com>, Guozhang Wang <firstname.lastname@example.org>