diff options
Diffstat (limited to 'src/main/java/io/swagger/api/impl/DcaeServicesApiServiceImpl.java')
-rw-r--r-- | src/main/java/io/swagger/api/impl/DcaeServicesApiServiceImpl.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main/java/io/swagger/api/impl/DcaeServicesApiServiceImpl.java b/src/main/java/io/swagger/api/impl/DcaeServicesApiServiceImpl.java index fe938f1..f1219ac 100644 --- a/src/main/java/io/swagger/api/impl/DcaeServicesApiServiceImpl.java +++ b/src/main/java/io/swagger/api/impl/DcaeServicesApiServiceImpl.java @@ -90,7 +90,7 @@ public class DcaeServicesApiServiceImpl extends DcaeServicesApiService { // TODO: When putting together the components fail. Should this be a 500 case? // For now, this is just logged as a warning. - if (COMPONENT_SOURCE_DCAE_CONTROLLER.equals(sco.getComponentSource().toUpperCase(Locale.ENGLISH))) { + if (COMPONENT_SOURCE_DCAE_CONTROLLER.equalsIgnoreCase(sco.getComponentSource())) { if (this.dcaeControllerClient != null) { try { DCAEControllerClient.ServiceInstance serviceInstance @@ -105,7 +105,7 @@ public class DcaeServicesApiServiceImpl extends DcaeServicesApiService { LOG.warn(String.format("%s, %s", e.getMessage(), sco.toString()), e); } } - } else if (COMPONENT_SOURCE_DATA_BUS_CONTROLLER.equals(sco.getComponentSource().toUpperCase(Locale.ENGLISH))) { + } else if (COMPONENT_SOURCE_DATA_BUS_CONTROLLER.equalsIgnoreCase(sco.getComponentSource())) { if (this.databusControllerClient != null) { try { if (this.databusControllerClient.isExists(sco.getComponentId())) { @@ -150,7 +150,7 @@ public class DcaeServicesApiServiceImpl extends DcaeServicesApiService { sb.append(" join dcae_services_components_maps m on ds.service_id = m.service_id "); sb.append(" join dcae_service_components dsc on m.component_id = dsc.component_id"); - List<String> whereClauses = new ArrayList<String>(); + List<String> whereClauses = new ArrayList<>(); if (typeId != null) { whereClauses.add("ds.type_id = :typeId"); @@ -229,7 +229,7 @@ public class DcaeServicesApiServiceImpl extends DcaeServicesApiService { List<DCAEServiceObject> serviceObjectsSliced = serviceObjects.subList(offset, endpoint); DCAEServiceComponentsDAO componentsDAO = InventoryDAOManager.getInstance().getDCAEServiceComponentsDAO(); - List<DCAEService> services = new ArrayList<DCAEService>(); + List<DCAEService> services = new ArrayList<>(); for (DCAEServiceObject so : serviceObjectsSliced) { List<DCAEServiceComponentObject> components = componentsDAO.getByServiceId(so.getServiceId()); @@ -302,7 +302,7 @@ public class DcaeServicesApiServiceImpl extends DcaeServicesApiService { // Watch! We have to query for services regardless of status because we need to account for "removed" instances // that get resurrected. final DCAEServiceObject serviceObjectFromStore = servicesDAO.getByServiceId(serviceId); - final Map<String, DCAEServiceComponentObject> componentObjectsFromStore = new HashMap<String, DCAEServiceComponentObject>(); + final Map<String, DCAEServiceComponentObject> componentObjectsFromStore = new HashMap<>(); for (DCAEServiceComponentObject componentObject : componentsDAO.getByServiceId(serviceId)) { componentObjectsFromStore.put(componentObject.getComponentId(), componentObject); @@ -333,7 +333,7 @@ public class DcaeServicesApiServiceImpl extends DcaeServicesApiService { // 2) Insert/update DCAEServiceComponentObjects. Components exist independent of the associated DCAE service. - Map<String, DCAEServiceComponentObject> componentObjectsToSendBack = new HashMap<String, DCAEServiceComponentObject>(); + Map<String, DCAEServiceComponentObject> componentObjectsToSendBack = new HashMap<>(); for (DCAEServiceComponentRequest requestComponent : request.getComponents()) { // Have to query the database rather than checking the result of getting by service id because of the |