This is an automated email from the ASF dual-hosted git repository.

nic pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kylin.git


The following commit(s) were added to refs/heads/master by this push:
     new 8d5f4a4  KYLIN-4027, protect client execute
8d5f4a4 is described below

commit 8d5f4a46829df0b2c1c0d51d798daefdf67a08d6
Author: Haifeng Wang <1150082...@qq.com>
AuthorDate: Thu Jun 20 11:57:45 2019 +0800

    KYLIN-4027, protect client execute
---
 jdbc/src/main/java/org/apache/kylin/jdbc/KylinClient.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/jdbc/src/main/java/org/apache/kylin/jdbc/KylinClient.java 
b/jdbc/src/main/java/org/apache/kylin/jdbc/KylinClient.java
index 2f23f4e..d98a982 100644
--- a/jdbc/src/main/java/org/apache/kylin/jdbc/KylinClient.java
+++ b/jdbc/src/main/java/org/apache/kylin/jdbc/KylinClient.java
@@ -441,8 +441,8 @@ public class KylinClient implements IRemoteClient {
         StringEntity requestEntity = new StringEntity(postBody, 
ContentType.create("application/json", "UTF-8"));
         post.setEntity(requestEntity);
 
-        HttpResponse response = httpClient.execute(post);
         try {
+            HttpResponse response = httpClient.execute(post);
             if (response.getStatusLine().getStatusCode() != 200 && 
response.getStatusLine().getStatusCode() != 201) {
                 throw asIOException(post, response);
             }

Reply via email to