Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
MINOR: Catch null pointer exception for empty leader URL when assignment is null #4798
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
cb.onCompletion immediately. E.g.
Exception e = new ConnectException(...); cb.onCompletion(e, null);
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