You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by phunt <gi...@git.apache.org> on 2018/04/25 21:58:25 UTC

[GitHub] zookeeper pull request #496: ZOOKEEPER-3008: Potential NPE in SaslQuorumAuth...

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

    https://github.com/apache/zookeeper/pull/496#discussion_r184218439
  
    --- Diff: src/java/main/org/apache/zookeeper/server/quorum/auth/SaslQuorumAuthLearner.java ---
    @@ -94,7 +94,10 @@ public void authenticate(Socket sock, String hostName) throws IOException {
                         principalConfig,
                         QuorumAuth.QUORUM_SERVER_PROTOCOL_NAME,
                         QuorumAuth.QUORUM_SERVER_SASL_DIGEST, LOG, "QuorumLearner");
    -
    +            if (sc == null) {
    --- End diff --
    
    Same feedback as #495 
    
    1) check the callers and see if it's handled properly. Likely it will be logged there as well. Verify/report.
    2) No need to say exception in an exception. The text of LOG.error line seems like it would have been a good error string for the exception itself.
    3) as previously noted, add a test.


---