zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eribeiro <...@git.apache.org>
Subject [GitHub] zookeeper pull request #150: ZOOKEEPER-2184: Zookeeper Client should re-reso...
Date Mon, 30 Jan 2017 16:48:49 GMT
Github user eribeiro commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/150#discussion_r98484702
  
    --- Diff: src/java/main/org/apache/zookeeper/client/StaticHostProvider.java ---
    @@ -122,18 +122,19 @@ public int size() {
         private int nextAdded = 0;
         private int nextRemoved = 0;
     
    -    public int getNextAdded() {
    +    int getNextAdded() {
             return nextAdded;
         }
     
    -    public int getNextRemoved() {
    +    int getNextRemoved() {
             return nextRemoved;
         }
     
         public InetSocketAddress next(long spinDelay) {
             // Handle possible connection error by re-resolving hostname if possible
             if (!connectedSinceNext) {
                 InetSocketAddress curAddr = serverAddresses.get(currentIndex);
    +            String curHostString = getHostString(curAddr);
    --- End diff --
    
    
    edwardoliveira just now
    @fpj Sorry for yet another comment, mate (my last one, I promise). I cited this previously
but certainly got lost in my verbosite.
    
    Replace if (!getHostString(currAddr).equals(...)) { by 'if (!curHostString.equals()` at
Line 138;
    
    Replace getHostString(curAddr) with curHostString at line 139;
    
    Replace getHostString(curAddr) with curHostString at line 142;
    
    **IMHO, +1. Really great job!** :+1:
    
    Best regards,


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message