aboutsummaryrefslogtreecommitdiffstats
path: root/vnfmarket-be/vnf-sdk-marketplace
diff options
context:
space:
mode:
authorHarry Huang <huangxiangyu5@huawei.com>2017-09-21 14:43:11 +0800
committerHarry Huang <huangxiangyu5@huawei.com>2017-09-21 15:06:39 +0800
commit0ac0bf0a694bad3045cd6d9904432fe1b95255ac (patch)
tree969d5da2fb0422456f3f0e274caac5be0b3d9e2c /vnfmarket-be/vnf-sdk-marketplace
parent9dc004d5ce0dfc736fa644ae9492e7a4a612f2b5 (diff)
use List instead of ArrayList
major: L78 L81 L120 Change-Id: I0ebead681785fde5742fc37ac328fe31bd2398ca Signed-off-by: Harry Huang <huangxiangyu5@huawei.com> Issue-Id: VNFSDK-85
Diffstat (limited to 'vnfmarket-be/vnf-sdk-marketplace')
-rw-r--r--vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/db/resource/PackageManager.java2
-rw-r--r--vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/db/wrapper/PackageHandler.java8
2 files changed, 5 insertions, 5 deletions
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 84e07b3f..113e9663 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
@@ -132,7 +132,7 @@ public class PackageManager {
//STEP 1: Get the Existing download count from DB
//-------------------------------------------------
- ArrayList<PackageData> data = handler.queryByID(packageId);
+ List<PackageData> data = handler.queryByID(packageId);
if(data.isEmpty())
{
LOGGER.info("Package Info not foun for ID:" + packageId);
diff --git a/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/db/wrapper/PackageHandler.java b/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/db/wrapper/PackageHandler.java
index 3a3859a2..b526f1b9 100644
--- a/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/db/wrapper/PackageHandler.java
+++ b/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/db/wrapper/PackageHandler.java
@@ -16,7 +16,7 @@
package org.onap.vnfsdk.marketplace.db.wrapper;
import java.util.ArrayList;
-import java.util.Map;
+import java.util.List;
import org.onap.vnfsdk.marketplace.db.common.MarketplaceResourceType;
import org.onap.vnfsdk.marketplace.db.entity.PackageData;
@@ -74,10 +74,10 @@ public class PackageHandler extends BaseHandler<PackageData> {
* @return PackageData list
* @throws MarketplaceResourceException e
*/
- public ArrayList<PackageData> queryByID(String csarID)
+ public List<PackageData> queryByID(String csarID)
throws MarketplaceResourceException {
logger.info("packageHandler:start query package info.");
- ArrayList<PackageData> data = new ArrayList<PackageData>();
+ List<PackageData> data = new ArrayList<>();
logger.info("packageHandler:start query data .info:" + csarID);
IMarketplaceDao dao = new MarketplaceDaoImpl();
Object result = dao.getPackageData(csarID);
@@ -92,7 +92,7 @@ public class PackageHandler extends BaseHandler<PackageData> {
@Override
public void check(PackageData packageData) throws MarketplaceResourceException {
-
+ throw new UnsupportedOperationException();
}
}