This is an automated email from the ASF dual-hosted git repository. mmerli pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/master by this push: new 81ccffc Fix exception type check order bug (#5174) 81ccffc is described below commit 81ccffc8048f521613c670debcf54cb2a0b4e046 Author: Like <ke.l...@outlook.com> AuthorDate: Thu Sep 12 23:59:18 2019 +0800 Fix exception type check order bug (#5174) --- .../java/org/apache/pulsar/client/api/PulsarClientException.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pulsar-client-api/src/main/java/org/apache/pulsar/client/api/PulsarClientException.java b/pulsar-client-api/src/main/java/org/apache/pulsar/client/api/PulsarClientException.java index bb681ad..db9c1fc 100644 --- a/pulsar-client-api/src/main/java/org/apache/pulsar/client/api/PulsarClientException.java +++ b/pulsar-client-api/src/main/java/org/apache/pulsar/client/api/PulsarClientException.java @@ -231,12 +231,12 @@ public class PulsarClientException extends IOException { return (PulsarClientException) t; } else if (t instanceof RuntimeException) { throw (RuntimeException) t; + } else if (t instanceof InterruptedException) { + Thread.currentThread().interrupt(); + return new PulsarClientException(t); } else if (!(t instanceof ExecutionException)) { // Generic exception return new PulsarClientException(t); - } else if (t instanceof InterruptedException) { - Thread.currentThread().interrupt(); - return new PulsarClientException(t); } // Unwrap the exception to keep the same exception type but a stack trace that includes the application calling