You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/11/10 09:50:01 UTC

[GitHub] [pulsar] gaozhangmin opened a new pull request #12719: remove redundant string operation

gaozhangmin opened a new pull request #12719:
URL: https://github.com/apache/pulsar/pull/12719


   
   ### Motivation
   
   
   Some string operation is not necessary
   
   ### Modifications
   
   remove unnecessary string operation
   
   
   ### Documentation
   
   Check the box below and label this PR (if you have committer privilege).
   
   Need to update docs? 
   
   - [ ] `doc-required` 
     
     (If you need help on updating docs, create a doc issue)
     
   - [ ] `no-need-doc` 
     
   code optimize
     
   - [ ] `doc` 
     
     (If this PR contains doc changes)
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] codelipenghui merged pull request #12719: remove unnecessary string operation

Posted by GitBox <gi...@apache.org>.
codelipenghui merged pull request #12719:
URL: https://github.com/apache/pulsar/pull/12719


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] gaozhangmin commented on pull request #12719: remove unnecessary string operation

Posted by GitBox <gi...@apache.org>.
gaozhangmin commented on pull request #12719:
URL: https://github.com/apache/pulsar/pull/12719#issuecomment-964976956


   /pulsarbot run-failure-checks


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] RobertIndie commented on a change in pull request #12719: remove unnecessary string operation

Posted by GitBox <gi...@apache.org>.
RobertIndie commented on a change in pull request #12719:
URL: https://github.com/apache/pulsar/pull/12719#discussion_r747331212



##########
File path: pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/BaseResource.java
##########
@@ -267,7 +267,7 @@ public PulsarAdminException getApiException(Response response) {
 
     public static String getReasonFromServer(WebApplicationException e) {
         try {
-            return e.getResponse().readEntity(ErrorData.class).reason.toString();

Review comment:
       If we remove the `toString` call here, the `reason` may be null and be returned. We need to make sure that null is not returned here. The correct behavior is to return e.getMessage() when the `reason` is null.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] github-actions[bot] commented on pull request #12719: remove redundant string operation

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #12719:
URL: https://github.com/apache/pulsar/pull/12719#issuecomment-964956987


   @gaozhangmin:Thanks for your contribution. For this PR, do we need to update docs?
   (The [PR template contains info about doc](https://github.com/apache/pulsar/blob/master/.github/PULL_REQUEST_TEMPLATE.md#documentation), which helps others know more about the changes. Can you provide doc-related info in this and future PR descriptions? Thanks)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] gaozhangmin commented on pull request #12719: remove unnecessary string operation

Posted by GitBox <gi...@apache.org>.
gaozhangmin commented on pull request #12719:
URL: https://github.com/apache/pulsar/pull/12719#issuecomment-965939591


   /pulsarbot run-failure-checks


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] github-actions[bot] commented on pull request #12719: remove unnecessary string operation

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #12719:
URL: https://github.com/apache/pulsar/pull/12719#issuecomment-964962375


   @gaozhangmin:Thanks for providing doc info!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] gaozhangmin commented on pull request #12719: remove unnecessary string operation

Posted by GitBox <gi...@apache.org>.
gaozhangmin commented on pull request #12719:
URL: https://github.com/apache/pulsar/pull/12719#issuecomment-966033910


   /pulsarbot run-failure-checks


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org