Remove the useless judgement 63/13763/1
authorluxin <luxin7@huawei.com>
Wed, 20 Sep 2017 08:11:49 +0000 (16:11 +0800)
committerluxin <luxin7@huawei.com>
Wed, 20 Sep 2017 08:11:49 +0000 (16:11 +0800)
Change-Id: I6ba8235a01b54ba2cee541bad44f8f1266d7ba3c
Issue-Id:VFC-375
Signed-off-by: luxin <luxin7@huawei.com>
huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/common/DownloadCsarManager.java
huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/adapter/impl/AdapterResourceManager.java

index b2157ed..66d3b65 100644 (file)
@@ -96,6 +96,7 @@ public class DownloadCsarManager {
             is.close();
             fileout.flush();
             fileout.close();
+            client.close();
             status = Constant.DOWNLOADCSAR_SUCCESS;
 
         } catch(Exception e) {
index f9fe98f..13765a8 100644 (file)
@@ -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 {