diff options
author | Seshu Kumar M <seshu.kumar.m@huawei.com> | 2017-10-05 10:39:37 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2017-10-05 10:39:37 +0000 |
commit | 5c2d5ef7c999bf99a08d722f1347cf9518e1affa (patch) | |
tree | e5becff8e828f0c6ee622fa447664e549d01557d /adapters/mso-catalog-db-adapter | |
parent | 3ce5262436bcfdac9c2fac07fe590f04b93761ee (diff) | |
parent | 68f90644c41b0baec7645eef01d30254394edb7e (diff) |
Merge "Moved "" string literal on the left side."
Diffstat (limited to 'adapters/mso-catalog-db-adapter')
-rw-r--r-- | adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/CatalogDbAdapterRest.java | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/CatalogDbAdapterRest.java b/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/CatalogDbAdapterRest.java index aca8e9e633..668f73816d 100644 --- a/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/CatalogDbAdapterRest.java +++ b/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/CatalogDbAdapterRest.java @@ -142,19 +142,19 @@ public class CatalogDbAdapterRest { List<VnfResourceCustomization> ret; try (CatalogDatabase db = CatalogDatabase.getInstance()) { - if (vnfUuid != null && !vnfUuid.equals("")) { + if (vnfUuid != null && !"".equals(vnfUuid)) { uuid = vnfUuid; LOGGER.debug ("Query serviceVnfs getAllVnfsByVnfModelCustomizationUuid vnfModelCustomizationUuid: " + uuid); ret = db.getAllVnfsByVnfModelCustomizationUuid(uuid); } - else if (smUuid != null && !smUuid.equals("")) { + else if (smUuid != null && !"".equals(smUuid)) { uuid = smUuid; LOGGER.debug ("Query serviceVnfs getAllVnfsByServiceModelUuid serviceModelUuid: " + uuid); ret = db.getAllVnfsByServiceModelUuid(uuid); } - else if (smiUuid != null && !smiUuid.equals("")) { + else if (smiUuid != null && !"".equals(smiUuid)) { uuid = smiUuid; - if (smVer != null && !smVer.equals("")) { + if (smVer != null && !"".equals(smVer)) { LOGGER.debug ("Query serviceVnfs getAllNetworksByServiceModelInvariantUuid serviceModelInvariantUuid: " + uuid+ " serviceModelVersion: "+ smVer); ret = db.getAllVnfsByServiceModelInvariantUuid(uuid, smVer); } @@ -163,8 +163,8 @@ public class CatalogDbAdapterRest { ret = db.getAllVnfsByServiceModelInvariantUuid(uuid); } } - else if (smName != null && !smName.equals("")) { - if (smVer != null && !smVer.equals("")) { + else if (smName != null && !"".equals(smName)) { + if (smVer != null && !"".equals(smVer)) { LOGGER.debug ("Query serviceVnfs getAllVnfsByServiceName serviceModelInvariantName: " + smName+ " serviceModelVersion: "+ smVer); ret = db.getAllVnfsByServiceName(smName, smVer); } @@ -221,7 +221,7 @@ public class CatalogDbAdapterRest { @QueryParam("serviceModelVersion") String smVer, @QueryParam("networkModelVersion") String nmVer ) { - if (nModelName != null && !nModelName.equals("")) { + if (nModelName != null && !"".equals(nModelName)) { nType = nModelName; } return serviceNetworksImpl (version, IS_ARRAY, nUuid, nType, smUuid, smiUuid, smVer); @@ -234,24 +234,24 @@ public class CatalogDbAdapterRest { List<NetworkResourceCustomization> ret; try (CatalogDatabase db = CatalogDatabase.getInstance()) { - if (nUuid != null && !nUuid.equals("")) { + if (nUuid != null && !"".equals(nUuid)) { uuid = nUuid; LOGGER.debug ("Query serviceNetworks getAllNetworksByNetworkModelCustomizationUuid networkModelCustomizationUuid: " + uuid); ret = db.getAllNetworksByNetworkModelCustomizationUuid(uuid); } - else if (smUuid != null && !smUuid.equals("")) { + else if (smUuid != null && !"".equals(smUuid)) { uuid = smUuid; LOGGER.debug ("Query serviceNetworks getAllNetworksByServiceModelUuid serviceModelUuid: " + uuid); ret = db.getAllNetworksByServiceModelUuid(uuid); } - else if (nType != null && !nType.equals("")) { + else if (nType != null && !"".equals(nType)) { uuid = nType; LOGGER.debug ("Query serviceNetworks getAllNetworksByNetworkType serviceModelUuid: " + uuid); ret = db.getAllNetworksByNetworkType(uuid); } - else if (smiUuid != null && !smiUuid.equals("")) { + else if (smiUuid != null && !"".equals(smiUuid)) { uuid = smiUuid; - if (smVer != null && !smVer.equals("")) { + if (smVer != null && !"".equals(smVer)) { LOGGER.debug ("Query serviceNetworks getAllNetworksByServiceModelInvariantUuid serviceModelInvariantUuid: " + uuid+ " serviceModelVersion: "+ smVer); ret = db.getAllNetworksByServiceModelInvariantUuid(uuid, smVer); } @@ -299,14 +299,14 @@ public class CatalogDbAdapterRest { ServiceMacroHolder ret; try (CatalogDatabase db = CatalogDatabase.getInstance()) { - if (smUuid != null && !smUuid.equals("")) { + if (smUuid != null && !"".equals(smUuid)) { uuid = smUuid; LOGGER.debug ("Query serviceMacroHolder getAllResourcesByServiceModelUuid serviceModelUuid: " + uuid); ret = db.getAllResourcesByServiceModelUuid(uuid); } - else if (smiUuid != null && !smiUuid.equals("")) { + else if (smiUuid != null && !"".equals(smiUuid)) { uuid = smiUuid; - if (smVer != null && !smVer.equals("")) { + if (smVer != null && !"".equals(smVer)) { LOGGER.debug ("Query serviceMacroHolder getAllResourcesByServiceModelInvariantUuid serviceModelInvariantUuid: " + uuid+ " serviceModelVersion: "+ smVer); ret = db.getAllResourcesByServiceModelInvariantUuid(uuid, smVer); } @@ -370,14 +370,14 @@ public class CatalogDbAdapterRest { List<AllottedResourceCustomization > ret; try (CatalogDatabase db = CatalogDatabase.getInstance()) { - if (smUuid != null && !smUuid.equals("")) { + if (smUuid != null && !"".equals(smUuid)) { uuid = smUuid; LOGGER.debug ("Query AllottedResourceCustomization getAllAllottedResourcesByServiceModelUuid serviceModelUuid: " + uuid); ret = db.getAllAllottedResourcesByServiceModelUuid(uuid); } - else if (smiUuid != null && !smiUuid.equals("")) { + else if (smiUuid != null && !"".equals(smiUuid)) { uuid = smiUuid; - if (smVer != null && !smVer.equals("")) { + if (smVer != null && !"".equals(smVer)) { LOGGER.debug ("Query AllottedResourceCustomization getAllAllottedResourcesByServiceModelInvariantUuid serviceModelInvariantUuid: " + uuid+ " serviceModelVersion: "+ smVer); ret = db.getAllAllottedResourcesByServiceModelInvariantUuid(uuid, smVer); } @@ -386,7 +386,7 @@ public class CatalogDbAdapterRest { ret = db.getAllAllottedResourcesByServiceModelInvariantUuid(uuid); } } - else if (aUuid != null && !aUuid.equals("")) { + else if (aUuid != null && !"".equals(aUuid)) { uuid = aUuid; LOGGER.debug ("Query AllottedResourceCustomization getAllAllottedResourcesByArModelCustomizationUuid serviceModelUuid: " + uuid); ret = db.getAllAllottedResourcesByArModelCustomizationUuid(uuid); @@ -428,11 +428,11 @@ public class CatalogDbAdapterRest { CatalogDatabase db = CatalogDatabase.getInstance(); try{ - if(vfModuleModelName != null && !vfModuleModelName.equals("")){ + if(vfModuleModelName != null && !"".equals(vfModuleModelName)){ LOGGER.debug ("Query vfModules by vfModuleModuleName: " + vfModuleModelName); VfModuleCustomization vfModule = db.getVfModuleCustomizationByModelName(vfModuleModelName); if(vfModule != null){ - ret = new ArrayList<VfModuleCustomization>(1); + ret = new ArrayList<>(1); ret.add(vfModule); } }else{ @@ -466,4 +466,4 @@ public class CatalogDbAdapterRest { } } -}
\ No newline at end of file +} |