Fix nexus-iq issues 27/38027/1
authorluxin <luxin7@huawei.com>
Fri, 23 Mar 2018 09:30:15 +0000 (17:30 +0800)
committerluxin <luxin7@huawei.com>
Fri, 23 Mar 2018 09:30:15 +0000 (17:30 +0800)
Change-Id: I739a9048f6d8ab94a48f3c68c9c604cd3ae369f8
Issue-ID: VFC-725
Signed-off-by: luxin <luxin7@huawei.com>
huawei/vnfmadapter/VnfmadapterService/service/pom.xml
huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/adapter/impl/AdapterResourceManager.java
huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/dao/impl/VnfmDaoImpl.java

index a18c043..0b521cb 100644 (file)
         <dependency>
             <groupId>org.codehaus.jackson</groupId>
             <artifactId>jackson-jaxrs</artifactId>
-            <version>1.9.2</version>
+            <version>1.9.13</version>
         </dependency>
         <dependency>
             <groupId>javax.ws.rs</groupId>
         <dependency>
             <groupId>org.apache.httpcomponents</groupId>
             <artifactId>httpclient</artifactId>
-            <version>4.3.5</version>
+            <version>4.5.3</version>
         </dependency>
         <dependency>
             <groupId>org.apache.httpcomponents</groupId>
             <artifactId>httpclient-cache</artifactId>
-            <version>4.3.5</version>
+            <version>4.5.3</version>
         </dependency>
         <dependency>
             <groupId>org.apache.httpcomponents</groupId>
             <artifactId>httpmime</artifactId>
-            <version>4.3.5</version>
+            <version>4.5.3</version>
         </dependency>
 
         <!--dependency>
             <artifactId>com.springsource.org.apache.commons.httpclient</artifactId>
             <version>3.1.0</version>
         </dependency-->
-        <dependency>
-            <groupId>org.apache.httpcomponents</groupId>
-            <artifactId>httpclient</artifactId>
-        </dependency>
         <dependency>
             <groupId>commons-httpclient</groupId>
             <artifactId>commons-httpclient</artifactId>
             <version>3.1</version>
         </dependency>
-        <dependency>
-            <groupId>org.apache.httpcomponents</groupId>
-            <artifactId>httpclient</artifactId>
-            <version>4.3.5</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.httpcomponents</groupId>
-            <artifactId>httpclient-cache</artifactId>
-            <version>4.3.5</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.httpcomponents</groupId>
-            <artifactId>httpmime</artifactId>
-            <version>4.3.5</version>
-        </dependency>
         <dependency>
             <groupId>org.apache.cxf</groupId>
             <artifactId>cxf-rt-frontend-jaxrs</artifactId>
index 53e51de..a50548a 100644 (file)
@@ -308,7 +308,8 @@ public class AdapterResourceManager implements IResourceManager {
             LOG.info("changeWorkingDirectory: " + ftpClient.changeWorkingDirectory(vnfpkg.getString(VNFD_FILE_PATH)));
             String vnfdPath = csarfilepath + "Artifacts/Deployment/OTHER/";
             LOG.info("vnfd_file_name: " + vnfdPath + vnfpkg.getString("vnfd_file_name"));
-            try(InputStream inputStream = new FileInputStream(new File(vnfdPath + vnfpkg.getString("vnfd_file_name")))){
+            try (InputStream inputStream =
+                    new FileInputStream(new File(vnfdPath + vnfpkg.getString("vnfd_file_name")))) {
                 flag = ftpClient.storeFile(vnfpkg.getString("vnfd_file_name"), inputStream);
                 if(flag) {
                     resJson.put("message", "upload Csar success!");
@@ -617,7 +618,7 @@ public class AdapterResourceManager implements IResourceManager {
                 + "vnfpkginfo" + System.getProperty(Constant.FILE_SEPARATOR) + Constant.VNFPKGINFO;
 
         try (InputStream ins = new FileInputStream(fileName)) {
-            try(BufferedInputStream bins = new BufferedInputStream(ins)){
+            try (BufferedInputStream bins = new BufferedInputStream(ins)) {
                 byte[] contentByte = new byte[ins.available()];
                 int num = bins.read(contentByte);
 
@@ -642,7 +643,7 @@ public class AdapterResourceManager implements IResourceManager {
                 + "vnfpkginfo" + System.getProperty(Constant.FILE_SEPARATOR) + "vnfd_ids.json";
 
         try (InputStream ins = new FileInputStream(fileName)) {
-            try (BufferedInputStream bins = new BufferedInputStream(ins)){
+            try (BufferedInputStream bins = new BufferedInputStream(ins)) {
                 byte[] contentByte = new byte[ins.available()];
                 int num = bins.read(contentByte);
 
index 0c6b448..30bd68b 100644 (file)
@@ -18,18 +18,18 @@ package org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.dao.impl;
 
 import java.util.List;
 
+import org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.common.restclient.ServiceException;
 import org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.dao.inf.AbstractDao;
 import org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.dao.inf.VnfmDao;
 import org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.entity.Vnfm;
 import org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.mapper.VnfmMapper;
-import org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.common.restclient.ServiceException;
 
 /**
  * VNFM DAO
  * .</br>
  *
  * @author
- * @version     VFC 1.0  Sep 14, 2016
+ * @version VFC 1.0 Sep 14, 2016
  */
 public class VnfmDaoImpl extends AbstractDao implements VnfmDao {