Skip to content

Commit

Permalink
CIRC-2051 fix code smells
Browse files Browse the repository at this point in the history
  • Loading branch information
roman-barannyk committed Apr 12, 2024
1 parent 5482316 commit 818fd01
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public class AllowedServicePointsService {
private final InstanceRepository instanceRepository;
private final String indexName;

public AllowedServicePointsService(Clients clients, Boolean isEcsRequestRouting) {
public AllowedServicePointsService(Clients clients, boolean isEcsRequestRouting) {
itemRepository = new ItemRepository(clients);
userRepository = new UserRepository(clients);
requestRepository = new RequestRepository(clients);
Expand Down Expand Up @@ -284,14 +284,14 @@ private Result<Item> refuseIfItemIsNotFound(Item item, AllowedServicePointsReque
.collect(Collectors.toCollection(ArrayList::new)); // collect into a mutable list

// TODO: fetch service points on a later stage, we only need IDs here
return fetchServicePoints(requestTypesAllowedByPolicy, servicePointAllowedByPolicy, indexName)
return fetchServicePoints(requestTypesAllowedByPolicy, servicePointAllowedByPolicy)
.thenApply(r -> r.map(servicePoints -> groupAllowedServicePointsByRequestType(
requestTypesAllowedByPolicyAndStatus, servicePoints, servicePointAllowedByPolicy)));
}

private CompletableFuture<Result<Set<AllowedServicePoint>>> fetchServicePoints(
List<RequestType> requestTypesAllowedByPolicy,
Map<RequestType, Set<String>> servicePointsAllowedByPolicy, String indexName) {
Map<RequestType, Set<String>> servicePointsAllowedByPolicy) {

Set<String> allowedServicePointsIds = servicePointsAllowedByPolicy.values().stream()
.flatMap(Collection::stream)
Expand Down

0 comments on commit 818fd01

Please sign in to comment.