From c8ef69f735803f6ed19dd9ab4387ce725a2cf439 Mon Sep 17 00:00:00 2001 From: luxin Date: Wed, 20 Sep 2017 16:11:49 +0800 Subject: Remove the useless judgement Change-Id: I6ba8235a01b54ba2cee541bad44f8f1266d7ba3c Issue-Id:VFC-375 Signed-off-by: luxin --- .../nfvo/vnfm/svnfm/vnfmadapter/common/DownloadCsarManager.java | 1 + .../vnfmadapter/service/adapter/impl/AdapterResourceManager.java | 8 ++------ 2 files changed, 3 insertions(+), 6 deletions(-) (limited to 'huawei') diff --git a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/common/DownloadCsarManager.java b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/common/DownloadCsarManager.java index b2157ed9..66d3b650 100644 --- a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/common/DownloadCsarManager.java +++ b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/common/DownloadCsarManager.java @@ -96,6 +96,7 @@ public class DownloadCsarManager { is.close(); fileout.flush(); fileout.close(); + client.close(); status = Constant.DOWNLOADCSAR_SUCCESS; } catch(Exception e) { diff --git a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/adapter/impl/AdapterResourceManager.java b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/adapter/impl/AdapterResourceManager.java index f9fe98f5..13765a88 100644 --- a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/adapter/impl/AdapterResourceManager.java +++ b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/adapter/impl/AdapterResourceManager.java @@ -596,12 +596,8 @@ public class AdapterResourceManager implements IResourceManager { if(fileContent != null) { jsonObject = JSONObject.fromObject(fileContent).getJSONObject("vnfdIds"); } - if(ins != null) { - ins.close(); - } - if(bins != null) { - bins.close(); - } + ins.close(); + bins.close(); } catch(Exception e) { LOG.error(fileName + " read error!", e); } finally { -- cgit 1.2.3-korg