Merge "use List in PackageManager"
diff --git a/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/db/resource/PackageManager.java b/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/db/resource/PackageManager.java
index 6357371..84e07b3 100644
--- a/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/db/resource/PackageManager.java
+++ b/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/db/resource/PackageManager.java
@@ -17,6 +17,7 @@
 
 import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
 import org.onap.vnfsdk.marketplace.db.common.Parameters;
@@ -64,10 +65,10 @@
      * @return package data list
      * @throws MarketplaceResourceException e
      */
-    public ArrayList<PackageData> queryPackageByCsarId(String csarId)
+    public List<PackageData> queryPackageByCsarId(String csarId)
             throws MarketplaceResourceException {
         LOGGER.info("start query package info by csarid." + csarId);
-        ArrayList<PackageData> data = handler.queryByID(csarId);
+        List<PackageData> data = handler.queryByID(csarId);
         LOGGER.info("query package info end.size:" + data.size() + "detail:"
                 + MarketplaceDbUtil.objectToString(data));
         return data;
@@ -83,11 +84,11 @@
      * @return package data list
      * @throws MarketplaceResourceException e
      */
-    public ArrayList<PackageData> queryPackage(String name, String provider, String version,
+    public List<PackageData> queryPackage(String name, String provider, String version,
             String deletionPending, String type) throws MarketplaceResourceException {
         LOGGER.info("start query package info.name:" + name + " provider:" + provider + " version:"
                 + version + " type:" + type);
-        Map<String, String> queryParam = new HashMap<String, String>();
+        Map<String, String> queryParam = new HashMap<>();
         if (MarketplaceDbUtil.isNotEmpty(name)) {
             queryParam.put(Parameters.name.name(), name);
         }
@@ -103,7 +104,7 @@
         if (MarketplaceDbUtil.isNotEmpty(provider)) {
             queryParam.put(Parameters.provider.name(), provider);
         }
-        ArrayList<PackageData> data = handler.query(queryParam);
+        List<PackageData> data = handler.query(queryParam);
         LOGGER.info("query package info end.size:" + data.size() + "detail:"
                 + MarketplaceDbUtil.objectToString(data));
         return data;
@@ -149,3 +150,4 @@
         LOGGER.info("Download count updated to :" + idownloadcount);
     }
 }
+
diff --git a/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/wrapper/PackageWrapper.java b/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/wrapper/PackageWrapper.java
index 518d206..97b96b8 100644
--- a/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/wrapper/PackageWrapper.java
+++ b/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/wrapper/PackageWrapper.java
@@ -135,7 +135,7 @@
      */
     public Response queryPackageListByCond(String name, String provider, String version,
             String deletionPending, String type) {
-        ArrayList<PackageData> dbresult = new ArrayList<>();
+        List<PackageData> dbresult = new ArrayList<>();
         List<PackageMeta> result = new ArrayList<>();
         LOG.info("query package info.name:" + name + " provider:" + provider + " version" + version
                 + " deletionPending" + deletionPending + " type:" + type);
diff --git a/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/wrapper/PackageWrapperUtil.java b/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/wrapper/PackageWrapperUtil.java
index c55019d..cddb4c4 100644
--- a/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/wrapper/PackageWrapperUtil.java
+++ b/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/wrapper/PackageWrapperUtil.java
@@ -106,7 +106,7 @@
    */
   public static PackageData getPackageInfoById(String csarId) {
     PackageData result = new PackageData();
-    ArrayList<PackageData> packageDataList = new ArrayList<>();
+    List<PackageData> packageDataList = new ArrayList<>();
     try {
       packageDataList = PackageManager.getInstance().queryPackageByCsarId(csarId);
       if (packageDataList != null && ! packageDataList.isEmpty()) {
@@ -165,7 +165,7 @@
    * @return download uri
    */
   public static String getPackagePath(String csarId) {
-    ArrayList<PackageData> packageList = new ArrayList<>();
+    List<PackageData> packageList = new ArrayList<>();
     String downloadUri = null;
     try {
       packageList = PackageManager.getInstance().queryPackageByCsarId(csarId);
@@ -354,3 +354,4 @@
     }
   }
 }
+