summaryrefslogtreecommitdiffstats
path: root/rulemgt/src/main/java/org
diff options
context:
space:
mode:
authoryoubowu <wu.youbo@zte.com.cn>2017-02-27 16:37:17 +0800
committer6092002067 <wu.youbo@zte.com.cn>2017-02-27 16:37:17 +0800
commitb89572c4c6963ca3d6707e4a21e436bd2309f8ee (patch)
tree4d0fc553037329f245cdf02133e74047d7b4f302 /rulemgt/src/main/java/org
parent3e1081668fbff463553e7b742f120954ac60210b (diff)
Fix the sonar detected error
Issue-ID:HOLMES-50 Change-Id: Ia43c44cf70f6a0ac99592e4e302fda5f123cfc4f Signed-off-by: youbowu <wu.youbo@zte.com.cn>
Diffstat (limited to 'rulemgt/src/main/java/org')
-rw-r--r--rulemgt/src/main/java/org/openo/holmes/rulemgt/bolt/enginebolt/EngineService.java24
1 files changed, 3 insertions, 21 deletions
diff --git a/rulemgt/src/main/java/org/openo/holmes/rulemgt/bolt/enginebolt/EngineService.java b/rulemgt/src/main/java/org/openo/holmes/rulemgt/bolt/enginebolt/EngineService.java
index da62a22..b96303a 100644
--- a/rulemgt/src/main/java/org/openo/holmes/rulemgt/bolt/enginebolt/EngineService.java
+++ b/rulemgt/src/main/java/org/openo/holmes/rulemgt/bolt/enginebolt/EngineService.java
@@ -72,13 +72,7 @@ public class EngineService {
}
return httpClient.execute(httpPost);
} finally {
- if (httpClient != null) {
- try {
- httpClient.close();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
+ httpClient.close();
}
}
@@ -92,13 +86,7 @@ public class EngineService {
}
return httpClient.execute(httpPut);
} finally {
- if (httpClient != null) {
- try {
- httpClient.close();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
+ httpClient.close();
}
}
@@ -109,13 +97,7 @@ public class EngineService {
setHeader(httpDelete);
return httpClient.execute(httpDelete);
} finally {
- if (httpClient != null) {
- try {
- httpClient.close();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
+ httpClient.close();
}
}