From 2c3be92eccd45ebad09d4fea7245f11a3c14f583 Mon Sep 17 00:00:00 2001 From: Munir Ahmad Date: Fri, 2 Mar 2018 19:47:30 -0500 Subject: Replace explicit type with dimond type Change-Id: I1dedb9ef1ca7b734e3cfc0a3a594d733dbd298d4 Issue-ID: SO-437 Signed-off-by: Munir Ahmad --- .../main/java/org/openecomp/mso/db/catalog/CatalogDatabase.java | 2 +- .../org/openecomp/mso/db/catalog/beans/ServiceMacroHolder.java | 2 +- .../main/java/org/openecomp/mso/db/catalog/beans/VnfResource.java | 8 ++++---- .../openecomp/mso/db/catalog/beans/VnfResourceCustomization.java | 2 +- .../org/openecomp/mso/db/catalog/test/CatalogDatabaseTest.java | 6 +++--- .../org/openecomp/mso/db/catalog/test/MavenVersioningTest.java | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) (limited to 'mso-catalog-db/src') 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 7cf8c2190c..774953435c 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 @@ -2693,7 +2693,7 @@ public class CatalogDatabase implements Closeable { } private void populateNetworkResourceType(List resultList) { - HashMap networkResources = new HashMap(); + HashMap networkResources = new HashMap<>(); for (NetworkResourceCustomization nrc : resultList) { String network_id = nrc.getNetworkResourceModelUuid(); 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(); + 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 getVfModuleCustomizations() { - return this.vfModuleCustomizations == null ? new ArrayList() : this.vfModuleCustomizations; + return this.vfModuleCustomizations == null ? new ArrayList<>() : this.vfModuleCustomizations; } public void setVfModuleCustomizations(ArrayList 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(); + 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(); + 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 list = new ArrayList(); + ArrayList 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(); + 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 paramSet = new HashSet(); + Set 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 variables = new HashMap(); + HashMap variables = new HashMap<>(); cd.executeQuerySingleRow("tets",variables,false); } @Test(expected = Exception.class) public void executeQueryMultipleRows(){ - HashMap variables = new HashMap(); + HashMap 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 list= new LinkedList(); + List list= new LinkedList<>(); list.add(test1); list.add(test2); list.add(test3); -- cgit 1.2.3-korg