diff options
Diffstat (limited to 'src/main/java/io/swagger/api')
3 files changed, 10 insertions, 10 deletions
diff --git a/src/main/java/io/swagger/api/impl/DcaeServiceTypesApiServiceImpl.java b/src/main/java/io/swagger/api/impl/DcaeServiceTypesApiServiceImpl.java index c3be670..fc6509a 100644 --- a/src/main/java/io/swagger/api/impl/DcaeServiceTypesApiServiceImpl.java +++ b/src/main/java/io/swagger/api/impl/DcaeServiceTypesApiServiceImpl.java @@ -112,7 +112,7 @@ public class DcaeServiceTypesApiServiceImpl extends DcaeServiceTypesApiService { } if (asdcServiceId != null) { - if ("NONE".equals(asdcServiceId.toUpperCase(Locale.ENGLISH))) { + if (asdcServiceId.equalsIgnoreCase("NONE")) { whereClauses.add("asdc_service_id is null"); } else { whereClauses.add(":asdcServiceId = asdc_service_id"); @@ -120,7 +120,7 @@ public class DcaeServiceTypesApiServiceImpl extends DcaeServiceTypesApiService { } if (asdcResourceId != null) { - if ("NONE".equals(asdcResourceId.toUpperCase(Locale.ENGLISH))) { + if (asdcResourceId.equalsIgnoreCase("NONE")) { whereClauses.add("asdc_resource_id is null"); } else { whereClauses.add(":asdcResourceId = asdc_resource_id"); diff --git a/src/main/java/io/swagger/api/impl/DcaeServicesApiServiceImpl.java b/src/main/java/io/swagger/api/impl/DcaeServicesApiServiceImpl.java index ae613da..f1219ac 100644 --- a/src/main/java/io/swagger/api/impl/DcaeServicesApiServiceImpl.java +++ b/src/main/java/io/swagger/api/impl/DcaeServicesApiServiceImpl.java @@ -76,7 +76,7 @@ public class DcaeServicesApiServiceImpl extends DcaeServicesApiService { service.setVnfLocation(serviceObject.getVnfLocation()); service.setDeploymentRef(serviceObject.getDeploymentRef()); - List<DCAEServiceComponent> serviceComponents = new ArrayList<DCAEServiceComponent>(); + List<DCAEServiceComponent> serviceComponents = new ArrayList<>(); for (DCAEServiceComponentObject sco : componentObjects) { DCAEServiceComponent component = new DCAEServiceComponent(); @@ -136,7 +136,7 @@ public class DcaeServicesApiServiceImpl extends DcaeServicesApiService { String componentType, Boolean shareable, DateTime created, Integer offset, UriInfo uriInfo, SecurityContext securityContext) { List<DCAEServiceObject> serviceObjects = new ArrayList<>(); - DateTime createdCutoff = (created == null ? DateTime.now(DateTimeZone.UTC) : created); + DateTime createdCutoff = created == null ? DateTime.now(DateTimeZone.UTC) : created; LOG.info(String.format("Create time upper bound cutoff: %s", createdCutoff.toString())); @@ -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"); @@ -211,7 +211,7 @@ public class DcaeServicesApiServiceImpl extends DcaeServicesApiService { if (shareable != null) { // NOTE: That the shareable field in the database is actually an integer. - query.bind("shareable", (shareable ? 1 : 0)); + query.bind("shareable", shareable ? 1 : 0); } query.bind("createdCutoff", createdCutoff); @@ -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 diff --git a/src/main/java/io/swagger/api/impl/DcaeServicesGroupbyApiServiceImpl.java b/src/main/java/io/swagger/api/impl/DcaeServicesGroupbyApiServiceImpl.java index 7c4e406..34fba7d 100644 --- a/src/main/java/io/swagger/api/impl/DcaeServicesGroupbyApiServiceImpl.java +++ b/src/main/java/io/swagger/api/impl/DcaeServicesGroupbyApiServiceImpl.java @@ -39,7 +39,7 @@ public class DcaeServicesGroupbyApiServiceImpl extends DcaeServicesGroupbyApiSer @Override public Response dcaeServicesGroupbyPropertyNameGet(String propertyName, UriInfo uriInfo, SecurityContext securityContext) { - String columnName = ""; + String columnName; switch (propertyName) { case "type": |