diff options
Diffstat (limited to 'rulemgt/src/main')
-rw-r--r-- | rulemgt/src/main/java/org/openo/holmes/rulemgt/bolt/enginebolt/EngineService.java | 24 |
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();
}
}
|