This is an automated email from the ASF dual-hosted git repository.

jensg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/master by this push:
     new 3a0e1fd  THRIFT-5008: Improve TSaslTransport logging Client: Java 
Patch: Qinghui Xu
3a0e1fd is described below

commit 3a0e1fd356963ad3ac0648b9891d1f8ff326f6ce
Author: Qinghui Xu <[email protected]>
AuthorDate: Wed Nov 13 10:52:43 2019 +0100

    THRIFT-5008: Improve TSaslTransport logging
    Client: Java
    Patch: Qinghui Xu
    
    This closes #1931
---
 lib/java/src/org/apache/thrift/transport/TSaslTransport.java | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/lib/java/src/org/apache/thrift/transport/TSaslTransport.java 
b/lib/java/src/org/apache/thrift/transport/TSaslTransport.java
index 4a453b6..4685d64 100644
--- a/lib/java/src/org/apache/thrift/transport/TSaslTransport.java
+++ b/lib/java/src/org/apache/thrift/transport/TSaslTransport.java
@@ -392,7 +392,7 @@ abstract class TSaslTransport extends TTransport {
     try {
       sasl.dispose();
     } catch (SaslException e) {
-      // Not much we can do here.
+      LOGGER.warn("Failed to dispose sasl participant.", e);
     }
   }
 
@@ -427,9 +427,7 @@ abstract class TSaslTransport extends TTransport {
     } catch (TTransportException transportException) {
       // If there is no-data or no-sasl header in the stream, log the failure, 
and rethrow.
       if (transportException.getType() == TTransportException.END_OF_FILE) {
-        if (LOGGER.isDebugEnabled()) {
-          LOGGER.debug("No data or no sasl data in the stream during 
negotiation");
-        }
+        LOGGER.debug("No data or no sasl data in the stream during 
negotiation");
       }
       throw transportException;
     }

Reply via email to