You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by GitBox <gi...@apache.org> on 2018/12/19 09:48:20 UTC

[GitHub] ok2c commented on a change in pull request #126: replace empty HttpResponseException.message with statusCode

ok2c commented on a change in pull request #126: replace empty HttpResponseException.message with statusCode
URL: https://github.com/apache/httpcomponents-client/pull/126#discussion_r242850662
 
 

 ##########
 File path: httpclient/src/main/java/org/apache/http/client/HttpResponseException.java
 ##########
 @@ -38,7 +38,7 @@
     private final int statusCode;
 
     public HttpResponseException(final int statusCode, final String s) {
-        super(s);
+        super(s == null || s.isEmpty() ? Integer.toString(statusCode) : s);
 
 Review comment:
   @panchenko Looks good. Would you mind using `TextUtils#isBlank` here instead, please?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org