Github user fpj commented on a diff in the pull request:
https://github.com/apache/zookeeper/pull/451#discussion_r186546855
--- Diff: src/java/main/org/apache/zookeeper/client/HostProvider.java ---
@@ -53,7 +54,7 @@
* @param spinDelay
* Milliseconds to wait if all hosts have been tried once.
*/
- public InetSocketAddress next(long spinDelay);
+ public InetSocketAddress next(long spinDelay) throws
UnknownHostException;
--- End diff --
It feels odd to throw unknown host here because `next` is supposed to
return a resolved host. The caller is asking for next resolved, not to resolve
a given host name. Why do we need to throw it here and assuming we do need to
throw something here, is there an exception that captures better the error you
are trying to propagate?
---