zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fpj <...@git.apache.org>
Subject [GitHub] zookeeper pull request #451: ZOOKEEPER-2184: Zookeeper Client should re-reso...
Date Mon, 07 May 2018 21:16:34 GMT
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?


---

Mime
View raw message