zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ZOOKEEPER-2825) 1. Remove unnecessary import; 2. `contains` instead of `indexOf > -1` for more readable; 3. Standardize `StringBuilder#append` usage for CLIENT module
Date Thu, 29 Jun 2017 20:41:00 GMT

    [ https://issues.apache.org/jira/browse/ZOOKEEPER-2825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16068954#comment-16068954
] 

ASF GitHub Bot commented on ZOOKEEPER-2825:
-------------------------------------------

Github user afine commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/297#discussion_r124907405
  
    --- Diff: src/java/main/org/apache/zookeeper/client/ZooKeeperSaslClient.java ---
    @@ -590,18 +590,15 @@ public boolean clientTunneledAuthenticationInProgress() {
                     // authentication is either in progress, successful, or failed.
     
                     // 1. Authentication hasn't finished yet: we must wait for it to do so.
    -                if ((isComplete() == false) &&
    -                    (isFailed() == false)) {
    +                if (!isComplete() && !isFailed()) {
                         return true;
                     }
     
                     // 2. SASL authentication has succeeded or failed..
    -                if (isComplete() || isFailed()) {
    -                    if (gotLastPacket == false) {
    -                        // ..but still in progress, because there is a final SASL
    -                        // message from server which must be received.
    +                if (!gotLastPacket) {
    --- End diff --
    
    nvm, did not see the code above. lgtm


> 1. Remove unnecessary import; 2. `contains` instead of `indexOf > -1` for more readable;
3. Standardize `StringBuilder#append` usage for CLIENT module
> ------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-2825
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2825
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: java client
>    Affects Versions: 3.5.3
>            Reporter: Benedict Jin
>            Assignee: Benedict Jin
>            Priority: Minor
>              Labels: refactoring
>             Fix For: 3.5.4, 3.6.0
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
> * Remove unncessnary import;
> * `contains` instead of `indexOf > -1` for more readable;
> * Standardize `StringBuilder#append` usage for CLIENT module



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message