diff options
Diffstat (limited to 'adapters/mso-catalog-db-adapter')
-rw-r--r-- | adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/rest/ServiceRestImpl.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/rest/ServiceRestImpl.java b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/rest/ServiceRestImpl.java index bc4d0064d0..9663033c20 100644 --- a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/rest/ServiceRestImpl.java +++ b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/rest/ServiceRestImpl.java @@ -63,7 +63,7 @@ public class ServiceRestImpl { public Service findService(@PathParam("modelUUID") String modelUUID, @QueryParam("depth") int depth) { org.onap.so.db.catalog.beans.Service service = serviceRepo.findOneByModelUUID(modelUUID); if (service == null) { - new CatalogEntityNotFoundException("Unable to find Service " + modelUUID); + throw new CatalogEntityNotFoundException("Unable to find Service " + modelUUID); } return serviceMapper.mapService(service, depth); } @@ -79,7 +79,7 @@ public class ServiceRestImpl { required = false) @QueryParam("distributionStatus") String distributionStatus, @Parameter(description = "depth", required = false) @QueryParam("depth") int depth) { List<Service> services = new ArrayList<>(); - List<org.onap.so.db.catalog.beans.Service> serviceFromDB = new ArrayList<>(); + List<org.onap.so.db.catalog.beans.Service> serviceFromDB; if (!Strings.isNullOrEmpty(modelName) && !Strings.isNullOrEmpty(distributionStatus)) { serviceFromDB = serviceRepo.findByModelNameAndDistrobutionStatus(modelName, distributionStatus); } else if (!Strings.isNullOrEmpty(modelName)) { |