mattisonchao commented on a change in pull request #14087:
URL: https://github.com/apache/pulsar/pull/14087#discussion_r800323226
##########
File path:
pulsar-broker/src/main/java/org/apache/pulsar/broker/web/PulsarWebResource.java
##########
@@ -1166,7 +1166,7 @@ public void validateTopicOperation(TopicName topicName,
TopicOperation operation
}
}
- protected Void handleCommonRestAsyncException(AsyncResponse asyncResponse,
Throwable ex) {
+ protected static Void handleCommonRestAsyncException(AsyncResponse
asyncResponse, Throwable ex) {
Review comment:
I think we need to use "handleCommonRestAsyncException" instead of
"resumeAsyncResponseExceptionally".
Because using ``handleCommonRestAsyncException`` we don't need to care if
it's a ``CompletionException`` exception. And we don't need to "return null" in
"exceptionally". I think this change could be clearer.
Thanks for your review, and let me know what you think.
##########
File path:
pulsar-broker/src/main/java/org/apache/pulsar/broker/web/PulsarWebResource.java
##########
@@ -1166,7 +1166,7 @@ public void validateTopicOperation(TopicName topicName,
TopicOperation operation
}
}
- protected Void handleCommonRestAsyncException(AsyncResponse asyncResponse,
Throwable ex) {
+ protected static Void handleCommonRestAsyncException(AsyncResponse
asyncResponse, Throwable ex) {
Review comment:
I think we need to use ``handleCommonRestAsyncException`` instead of
"resumeAsyncResponseExceptionally".
Because using ``handleCommonRestAsyncException`` we don't need to care if
it's a ``CompletionException`` exception. And we don't need to "return null" in
"exceptionally". I think this change could be clearer.
Thanks for your review, and let me know what you think.
##########
File path:
pulsar-broker/src/main/java/org/apache/pulsar/broker/web/PulsarWebResource.java
##########
@@ -1166,7 +1166,7 @@ public void validateTopicOperation(TopicName topicName,
TopicOperation operation
}
}
- protected Void handleCommonRestAsyncException(AsyncResponse asyncResponse,
Throwable ex) {
+ protected static Void handleCommonRestAsyncException(AsyncResponse
asyncResponse, Throwable ex) {
Review comment:
I think we need to use ``handleCommonRestAsyncException`` instead of
``resumeAsyncResponseExceptionally``.
Because using ``handleCommonRestAsyncException`` we don't need to care if
it's a ``CompletionException`` exception. And we don't need to "return null" in
"exceptionally". I think this change could be clearer.
Thanks for your review, and let me know what you think.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]