From 1b0318467163a7793a94b0962bc63fccf0d62a26 Mon Sep 17 00:00:00 2001 From: Oleksandr Vidinieiev Date: Tue, 26 Dec 2023 16:59:34 +0200 Subject: [PATCH] CIRC-1933 Address review comments --- .../org/folio/circulation/resources/SlipsResource.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/folio/circulation/resources/SlipsResource.java b/src/main/java/org/folio/circulation/resources/SlipsResource.java index 7976362e26..9eebad9961 100644 --- a/src/main/java/org/folio/circulation/resources/SlipsResource.java +++ b/src/main/java/org/folio/circulation/resources/SlipsResource.java @@ -103,10 +103,10 @@ private void getMany(RoutingContext routingContext) { final var userRepository = new UserRepository(clients); final var itemRepository = new ItemRepository(clients); - final AddressTypeRepository addressTypeRepository = new AddressTypeRepository(clients); - final ServicePointRepository servicePointRepository = new ServicePointRepository(clients); - final PatronGroupRepository patronGroupRepository = new PatronGroupRepository(clients); - final DepartmentRepository departmentRepository = new DepartmentRepository(clients); + final var addressTypeRepository = new AddressTypeRepository(clients); + final var servicePointRepository = new ServicePointRepository(clients); + final var patronGroupRepository = new PatronGroupRepository(clients); + final var departmentRepository = new DepartmentRepository(clients); final UUID servicePointId = UUID.fromString( routingContext.request().getParam(SERVICE_POINT_ID_PARAM)); @@ -142,7 +142,6 @@ private CompletableFuture>> fetchItemsForLocations( log.debug("fetchPagedItemsForLocations:: parameters multipleLocations: {}", () -> multipleRecordsAsString(multipleLocations)); Collection locations = multipleLocations.getRecords(); - Set locationIds = locations.stream() .map(Location::getId) .filter(StringUtils::isNoneBlank) @@ -157,7 +156,6 @@ private CompletableFuture>> fetchItemsForLocations( List itemStatusValues = itemStatuses.stream() .map(ItemStatus::getValue) .toList(); - Result statusQuery = exactMatchAny(STATUS_NAME_KEY, itemStatusValues); return itemRepository.findByIndexNameAndQuery(locationIds, EFFECTIVE_LOCATION_ID_KEY, statusQuery)