summaryrefslogtreecommitdiffstats
path: root/mso-catalog-db
diff options
context:
space:
mode:
Diffstat (limited to 'mso-catalog-db')
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/CatalogDatabase.java94
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceMacroHolder.java2
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfResource.java8
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfResourceCustomization.java2
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/test/CatalogDatabaseTest.java6
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/test/MavenVersioningTest.java2
6 files changed, 57 insertions, 57 deletions
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/CatalogDatabase.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/CatalogDatabase.java
index a4b57f13c1..46d0473746 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/CatalogDatabase.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/CatalogDatabase.java
@@ -205,7 +205,7 @@ public class CatalogDatabase implements Closeable {
LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. No template found", "CatalogDB", "getHeatTemplate", null);
return null;
}
- Collections.sort(resultList, new MavenLikeVersioningComparator());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse(resultList);
LOGGER.recordMetricEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getHeatTemplate", null);
@@ -366,7 +366,7 @@ public class CatalogDatabase implements Closeable {
LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. Service not found", "CatalogDB", "getServiceByName", null);
return null;
}
- Collections.sort (resultList, new MavenLikeVersioningComparator ());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse (resultList);
LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getServiceByName", null);
@@ -528,7 +528,7 @@ public class CatalogDatabase implements Closeable {
LOGGER.recordMetricEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. Service not found", "CatalogDB", "getServiceByModelName", null);
return null;
}
- Collections.sort(resultList, new MavenLikeVersioningComparator ());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse(resultList);
LOGGER.recordMetricEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getServiceByModelName", null);
@@ -600,7 +600,7 @@ public class CatalogDatabase implements Closeable {
return null;
}
- Collections.sort (resultList, new MavenLikeVersioningComparator ());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse (resultList);
LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getServiceRecipe", null);
@@ -644,7 +644,7 @@ public class CatalogDatabase implements Closeable {
return null;
}
- Collections.sort(resultList, new MavenLikeVersioningComparator());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse(resultList);
LOGGER.recordMetricEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getServiceRecipe", null);
@@ -671,7 +671,7 @@ public class CatalogDatabase implements Closeable {
return Collections.EMPTY_LIST;
}
- Collections.sort(resultList, new MavenLikeVersioningComparator());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse(resultList);
LOGGER.recordMetricEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getServiceRecipes", null);
@@ -748,7 +748,7 @@ public class CatalogDatabase implements Closeable {
LOGGER.recordMetricEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. VNF not found", "CatalogDB", "getVnfResource", null);
return null;
}
- Collections.sort(resultList, new MavenLikeVersioningComparator());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse(resultList);
LOGGER.recordMetricEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getVnfResource", null);
@@ -874,7 +874,7 @@ public class CatalogDatabase implements Closeable {
return null;
}
- Collections.sort(resultList, new MavenLikeVersioningComparator());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse(resultList);
LOGGER.recordMetricEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getVnfResourceCustomizationByModelCustomizationName", null);
@@ -975,7 +975,7 @@ public class CatalogDatabase implements Closeable {
LOGGER.recordMetricEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. VF not found", "CatalogDB", "getVfModuleModelName", null);
return null;
}
- Collections.sort(resultList, new MavenLikeVersioningComparator());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse(resultList);
LOGGER.recordMetricEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getVfModuleModelName", null);
@@ -1073,7 +1073,7 @@ public class CatalogDatabase implements Closeable {
return null;
}
- Collections.sort(resultList, new MavenLikeVersioningComparator());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse(resultList);
LOGGER.recordMetricEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getNetworkResource", null);
return resultList.get(0);
@@ -1122,7 +1122,7 @@ public class CatalogDatabase implements Closeable {
return null;
}
- Collections.sort(resultList, new MavenLikeVersioningComparator());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse(resultList);
LOGGER.recordMetricEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getVnfRecipe", null);
@@ -1155,7 +1155,7 @@ public class CatalogDatabase implements Closeable {
return null;
}
- Collections.sort(resultList, new MavenLikeVersioningComparator());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse(resultList);
LOGGER.recordMetricEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getVnfRecipe", null);
@@ -1186,7 +1186,7 @@ public class CatalogDatabase implements Closeable {
return null;
}
- Collections.sort(resultList, new MavenLikeVersioningComparator());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse(resultList);
LOGGER.recordMetricEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. VNF Recipe Entry found", "CatalogDB", "getVnfRecipeByVfModuleId", null);
@@ -1243,7 +1243,7 @@ public class CatalogDatabase implements Closeable {
LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. VF not found", "CatalogDB", "getVfModuleType", null);
return null;
}
- Collections.sort (resultList, new MavenLikeVersioningComparator ());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse (resultList);
LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getVfModuleType", null);
@@ -1370,7 +1370,7 @@ public class CatalogDatabase implements Closeable {
VfModule module = null;
if (modules != null && ! modules.isEmpty()) {
- Collections.sort (modules, new MavenLikeVersioningComparator ());
+ modules.sort(new MavenLikeVersioningComparator());
Collections.reverse (modules);
module = modules.get(0);
}
@@ -1826,7 +1826,7 @@ public class CatalogDatabase implements Closeable {
return null;
}
- Collections.sort (resultList, new MavenLikeVersioningComparator ());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse (resultList);
LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getVnfResourceCustomizationByVnfModelCustomizationNameAndModelVersionId", null);
@@ -2181,7 +2181,7 @@ public class CatalogDatabase implements Closeable {
return new ArrayList<>();
}
- Collections.sort (serviceList, new MavenLikeVersioningComparator ());
+ serviceList.sort(new MavenLikeVersioningComparator());
Collections.reverse (serviceList);
Service service = serviceList.get(0);
@@ -2209,7 +2209,7 @@ public class CatalogDatabase implements Closeable {
return new ArrayList<>();
}
- Collections.sort (serviceList, new MavenLikeVersioningComparator ());
+ serviceList.sort(new MavenLikeVersioningComparator());
Collections.reverse (serviceList);
Service service = serviceList.get(0);
@@ -2310,7 +2310,7 @@ public class CatalogDatabase implements Closeable {
return new ArrayList<>();
}
- Collections.sort (serviceList, new MavenLikeVersioningComparator ());
+ serviceList.sort(new MavenLikeVersioningComparator());
Collections.reverse (serviceList);
// Step 2 - Now query to get the related VnfResourceCustomizations
@@ -2343,7 +2343,7 @@ public class CatalogDatabase implements Closeable {
if (resultList.isEmpty()) {
return new ArrayList<>();
}
- Collections.sort (resultList, new MavenLikeVersioningComparator ());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse (resultList);
Service service = resultList.get(0);
//now just call the method that takes the version - the service object will have the highest version
@@ -2364,7 +2364,7 @@ public class CatalogDatabase implements Closeable {
if (resultList.isEmpty()) {
return new ArrayList<>();
}
- Collections.sort (resultList, new MavenLikeVersioningComparator ());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse (resultList);
Service service = resultList.get(0);
LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getAllVnfsByServiceModelInvariantUuid", null);
@@ -2403,7 +2403,7 @@ public class CatalogDatabase implements Closeable {
if (resultList.isEmpty()) {
return Collections.EMPTY_LIST;
}
- Collections.sort (resultList, new MavenLikeVersioningComparator ());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse (resultList);
Service service = resultList.get(0);
@@ -2473,7 +2473,7 @@ public class CatalogDatabase implements Closeable {
return new ArrayList<>();
}
- Collections.sort (serviceList, new MavenLikeVersioningComparator ());
+ serviceList.sort(new MavenLikeVersioningComparator());
Collections.reverse (serviceList);
Service service = serviceList.get(0);
@@ -2499,7 +2499,7 @@ public class CatalogDatabase implements Closeable {
return new ArrayList<>();
}
- Collections.sort (serviceList, new MavenLikeVersioningComparator ());
+ serviceList.sort(new MavenLikeVersioningComparator());
Collections.reverse (serviceList);
Service service = serviceList.get(0);
@@ -2571,7 +2571,7 @@ public class CatalogDatabase implements Closeable {
return new ServiceMacroHolder();
}
- Collections.sort (serviceList, new MavenLikeVersioningComparator ());
+ serviceList.sort(new MavenLikeVersioningComparator());
Collections.reverse (serviceList);
Service service = serviceList.get(0);
@@ -2600,7 +2600,7 @@ public class CatalogDatabase implements Closeable {
return new ServiceMacroHolder();
}
- Collections.sort (serviceList, new MavenLikeVersioningComparator ());
+ serviceList.sort(new MavenLikeVersioningComparator());
Collections.reverse (serviceList);
Service service = serviceList.get(0);
@@ -2633,7 +2633,7 @@ public class CatalogDatabase implements Closeable {
return new ServiceMacroHolder();
}
- Collections.sort (serviceList, new MavenLikeVersioningComparator ());
+ serviceList.sort(new MavenLikeVersioningComparator());
Collections.reverse (serviceList);
Service service = serviceList.get(0);
@@ -2681,7 +2681,7 @@ public class CatalogDatabase implements Closeable {
}
private void populateNetworkResourceType(List<NetworkResourceCustomization> resultList) {
- HashMap<String, NetworkResource> networkResources = new HashMap<String, NetworkResource>();
+ HashMap<String, NetworkResource> networkResources = new HashMap<>();
for (NetworkResourceCustomization nrc : resultList) {
String network_id = nrc.getNetworkResourceModelUuid();
@@ -2733,7 +2733,7 @@ public class CatalogDatabase implements Closeable {
return null;
}
- Collections.sort (resultList, new MavenLikeVersioningComparator ());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse (resultList);
VfModule vfMod = resultList.get(0);
@@ -2756,7 +2756,7 @@ public class CatalogDatabase implements Closeable {
return null;
}
- Collections.sort (resultList1, new MavenLikeVersioningComparator ());
+ resultList1.sort(new MavenLikeVersioningComparator());
Collections.reverse (resultList1);
LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. VNF recipe found", "CatalogDB", "getVfModuleRecipe", null);
@@ -2823,7 +2823,7 @@ public class CatalogDatabase implements Closeable {
return null;
}
- Collections.sort (resultList, new MavenLikeVersioningComparator ());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse (resultList);
VfModule vfMod = resultList.get(0);
@@ -2847,7 +2847,7 @@ public class CatalogDatabase implements Closeable {
return null;
}
- Collections.sort (resultList1, new MavenLikeVersioningComparator ());
+ resultList1.sort(new MavenLikeVersioningComparator());
Collections.reverse (resultList1);
LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. VNF recipe found", "CatalogDB", "getVnfComponentsRecipe", null);
@@ -2877,7 +2877,7 @@ public class CatalogDatabase implements Closeable {
return null;
}
- Collections.sort (resultList, new MavenLikeVersioningComparator ());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse (resultList);
VfModule vfMod = resultList.get(0);
@@ -2901,7 +2901,7 @@ public class CatalogDatabase implements Closeable {
return null;
}
- Collections.sort (resultList1, new MavenLikeVersioningComparator ());
+ resultList1.sort(new MavenLikeVersioningComparator());
Collections.reverse (resultList1);
LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. VNF recipe found", "CatalogDB", "getVnfComponentsRecipe", null);
@@ -4365,7 +4365,7 @@ public class CatalogDatabase implements Closeable {
return null;
}
- Collections.sort (resultList, new MavenLikeVersioningComparator ());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse (resultList);
return resultList.get (0);
@@ -4416,7 +4416,7 @@ public class CatalogDatabase implements Closeable {
return null;
}
- Collections.sort (resultList, new MavenLikeVersioningComparator ());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse (resultList);
return resultList.get (0);
@@ -4455,7 +4455,7 @@ public class CatalogDatabase implements Closeable {
return null;
}
- Collections.sort (resultList, new MavenLikeVersioningComparator ());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse (resultList);
return resultList.get (0);
@@ -4489,7 +4489,7 @@ public class CatalogDatabase implements Closeable {
return null;
}
- Collections.sort (resultList, new MavenLikeVersioningComparator ());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse (resultList);
return resultList.get (0);
@@ -4546,7 +4546,7 @@ public class CatalogDatabase implements Closeable {
if (resultList.isEmpty ()) {
return null;
}
- Collections.sort (resultList, new MavenLikeVersioningComparator ());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse (resultList);
return resultList.get (0);
@@ -4589,7 +4589,7 @@ public class CatalogDatabase implements Closeable {
if (resultList.isEmpty ()) {
return null;
}
- Collections.sort (resultList, new MavenLikeVersioningComparator ());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse (resultList);
return resultList.get (0);
@@ -4618,7 +4618,7 @@ public class CatalogDatabase implements Closeable {
return Collections.EMPTY_LIST;
}
- Collections.sort (resultList, new MavenLikeVersioningComparator ());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse (resultList);
LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getVfModuleRecipes", null);
@@ -4668,7 +4668,7 @@ public class CatalogDatabase implements Closeable {
if (resultList.isEmpty ()) {
return null;
}
- Collections.sort (resultList, new MavenLikeVersioningComparator ());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse (resultList);
return resultList.get (0);
@@ -4702,7 +4702,7 @@ public class CatalogDatabase implements Closeable {
if (resultList.isEmpty ()) {
return null;
}
- Collections.sort (resultList, new MavenLikeVersioningComparator ());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse (resultList);
return resultList.get (0);
@@ -4743,7 +4743,7 @@ public class CatalogDatabase implements Closeable {
LOGGER.debug("Catalog database - recipeResultList is null");
return null;
}
- Collections.sort(recipeResultList, new MavenLikeVersioningComparator());
+ recipeResultList.sort(new MavenLikeVersioningComparator());
Collections.reverse(recipeResultList);
LOGGER.debug("Catalog database - recipeResultList contains " + recipeResultList.get(0).toString());
@@ -4815,7 +4815,7 @@ public class CatalogDatabase implements Closeable {
LOGGER.debug("Catalog database - recipeResultList is null");
return null;
}
- Collections.sort(recipeResultList, new MavenLikeVersioningComparator());
+ recipeResultList.sort(new MavenLikeVersioningComparator());
Collections.reverse(recipeResultList);
LOGGER.debug("Catalog database - recipeResultList contains " + recipeResultList.get(0).toString());
@@ -4863,7 +4863,7 @@ public class CatalogDatabase implements Closeable {
LOGGER.debug("Catalog database - modelResultList is null");
return null;
}
- Collections.sort(modelResultList, new MavenLikeVersioningComparator());
+ modelResultList.sort(new MavenLikeVersioningComparator());
Collections.reverse(modelResultList);
LOGGER.debug("Catalog database - modelResultList contains " + modelResultList.get(0).toString());
@@ -4880,7 +4880,7 @@ public class CatalogDatabase implements Closeable {
LOGGER.debug("Catalog database - recipeResultList is null");
return null;
}
- Collections.sort(recipeResultList, new MavenLikeVersioningComparator());
+ recipeResultList.sort(new MavenLikeVersioningComparator());
Collections.reverse(recipeResultList);
LOGGER.debug("Catalog database - recipeResultList contains " + recipeResultList.get(0).toString());
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceMacroHolder.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceMacroHolder.java
index 645626d125..78f94e40c1 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceMacroHolder.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceMacroHolder.java
@@ -43,7 +43,7 @@ public class ServiceMacroHolder implements Serializable {
public ServiceMacroHolder() {
super();
this.service = null;
- this.vnfResources = new ArrayList<VnfResource>();
+ this.vnfResources = new ArrayList<>();
this.networkResourceCustomizations = new ArrayList<>();
this.allottedResourceCustomizations = new ArrayList<>();
this.vnfResourceCustomizations = new ArrayList<>();
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfResource.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfResource.java
index f0b990acae..806cbeb076 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfResource.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfResource.java
@@ -195,7 +195,7 @@ public class VnfResource extends MavenLikeVersioning implements Serializable {
}
public List<VfModuleCustomization> getVfModuleCustomizations() {
- return this.vfModuleCustomizations == null ? new ArrayList<VfModuleCustomization>() : this.vfModuleCustomizations;
+ return this.vfModuleCustomizations == null ? new ArrayList<>() : this.vfModuleCustomizations;
}
public void setVfModuleCustomizations(ArrayList<VfModuleCustomization> vfModuleCustomizations) {
this.vfModuleCustomizations = vfModuleCustomizations;
@@ -205,7 +205,7 @@ public class VnfResource extends MavenLikeVersioning implements Serializable {
if (this.vfModuleCustomizations != null) {
this.vfModuleCustomizations.add(vfmc);
} else {
- this.vfModuleCustomizations = new ArrayList<VfModuleCustomization>();
+ this.vfModuleCustomizations = new ArrayList<>();
this.vfModuleCustomizations.add(vfmc);
}
}
@@ -216,7 +216,7 @@ public class VnfResource extends MavenLikeVersioning implements Serializable {
if (this.vfModules != null) {
this.vfModules.add(vfm);
} else {
- this.vfModules = new HashSet<VfModule>();
+ this.vfModules = new HashSet<>();
this.vfModules.add(vfm);
}
}
@@ -225,7 +225,7 @@ public class VnfResource extends MavenLikeVersioning implements Serializable {
if (this.vfModules == null || this.vfModules.size() < 1) {
return null;
}
- ArrayList<VfModule> list = new ArrayList<VfModule>();
+ ArrayList<VfModule> list = new ArrayList<>();
list.addAll(this.vfModules);
return list;
}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfResourceCustomization.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfResourceCustomization.java
index 151c9e594e..b211dbd4c3 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfResourceCustomization.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfResourceCustomization.java
@@ -155,7 +155,7 @@ public class VnfResourceCustomization extends MavenLikeVersioning implements Ser
if (this.vfModuleCustomizations != null) {
this.vfModuleCustomizations.add(vfmc);
} else {
- this.vfModuleCustomizations = new ArrayList<VfModuleCustomization>();
+ this.vfModuleCustomizations = new ArrayList<>();
this.vfModuleCustomizations.add(vfmc);
}
}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/test/CatalogDatabaseTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/test/CatalogDatabaseTest.java
index e9f080b1dd..3cab4f243b 100644
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/test/CatalogDatabaseTest.java
+++ b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/test/CatalogDatabaseTest.java
@@ -2445,7 +2445,7 @@ public class CatalogDatabaseTest {
@Test(expected = Exception.class)
public void saveHeatTemplateTest(){
HeatTemplate heat = new HeatTemplate();
- Set <HeatTemplateParam> paramSet = new HashSet<HeatTemplateParam>();
+ Set <HeatTemplateParam> paramSet = new HashSet<>();
cd.saveHeatTemplate(heat,paramSet);
}
@Test(expected = Exception.class)
@@ -2665,12 +2665,12 @@ public class CatalogDatabaseTest {
@Test(expected = Exception.class)
public void executeQuerySingleRow(){
VnfComponent ar = new VnfComponent();
- HashMap<String, String> variables = new HashMap<String, String>();
+ HashMap<String, String> variables = new HashMap<>();
cd.executeQuerySingleRow("tets",variables,false);
}
@Test(expected = Exception.class)
public void executeQueryMultipleRows(){
- HashMap<String, String> variables = new HashMap<String, String>();
+ HashMap<String, String> variables = new HashMap<>();
cd.executeQueryMultipleRows("select",variables,false);
}
}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/test/MavenVersioningTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/test/MavenVersioningTest.java
index 5bcadb760b..3dddb17d7c 100644
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/test/MavenVersioningTest.java
+++ b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/test/MavenVersioningTest.java
@@ -153,7 +153,7 @@ public class MavenVersioningTest {
MavenLikeVersioning test12 = new MavenLikeVersioning();
test12.setVersion("2.0");
- List<MavenLikeVersioning> list= new LinkedList<MavenLikeVersioning>();
+ List<MavenLikeVersioning> list= new LinkedList<>();
list.add(test1);
list.add(test2);
list.add(test3);