Merge "Remove the useless judgement"
authorGao Weitao <victor.gao@huawei.com>
Wed, 20 Sep 2017 09:43:25 +0000 (09:43 +0000)
committerGerrit Code Review <gerrit@onap.org>
Wed, 20 Sep 2017 09:43:25 +0000 (09:43 +0000)
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 {