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

ASF GitHub Bot commented on HADOOP-19271:
-----------------------------------------

mukund-thakur commented on code in PR #7040:
URL: https://github.com/apache/hadoop/pull/7040#discussion_r1761439109


##########
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsManagedApacheHttpConnection.java:
##########
@@ -228,11 +236,9 @@ public int hashCode() {
 
   @Override
   public String toString() {
-    StringBuilder stringBuilder = new StringBuilder();
-    stringBuilder.append(
-            httpClientConnection.getRemoteAddress().getHostName())
-        .append(COLON)
-        .append(httpClientConnection.getRemotePort())
+    StringBuilder stringBuilder = targetHost != null ? new StringBuilder(
+        targetHost.toString()) : new StringBuilder();

Review Comment:
   targetHost.toString()) will take care of that. 





> [ABFS]: NPE in AbfsManagedApacheHttpConnection.toString() when not connected
> ----------------------------------------------------------------------------
>
>                 Key: HADOOP-19271
>                 URL: https://issues.apache.org/jira/browse/HADOOP-19271
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: fs/azure
>    Affects Versions: 3.4.1
>            Reporter: Steve Loughran
>            Assignee: Pranav Saxena
>            Priority: Blocker
>              Labels: pull-request-available
>
> if {{AbfsManagedApacheHttpConnection.toString()}} is invoked and 
> httpClientConnection is null, you get a stack trace.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to