Skip to content

Commit

Permalink
CIRCSTORE-540: fixed sonar issues
Browse files Browse the repository at this point in the history
  • Loading branch information
kapil-epam committed Dec 17, 2024
1 parent 0d592b3 commit 29b77fb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
package org.folio.service.event.handler;

import static org.apache.logging.log4j.LogManager.getLogger;
import static org.folio.kafka.KafkaHeaderUtils.kafkaHeadersToMap;

import org.apache.commons.collections4.map.CaseInsensitiveMap;
import org.apache.logging.log4j.Logger;
import org.folio.kafka.AsyncRecordHandler;
import org.folio.persist.RequestRepository;
import org.folio.rest.client.InventoryStorageClient;
import org.folio.service.event.EntityChangedEventPublisher;
import org.folio.service.event.handler.processor.ItemUpdateProcessorForRequest;

import io.vertx.core.Context;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,7 @@ private Future<Map<String, String>> updateItemAndServicePoint(JsonObject newObje
.compose(locations -> setEffectiveLocationData(locations, effectiveLocationId, locationAndSpData))
.compose(primaryServicePoint -> setRetrievalServicePointData(primaryServicePoint, locationAndSpData))
.compose(e -> Future.succeededFuture(locationAndSpData))
.onFailure(throwable -> {
log.info("ItemUpdateProcessorForRequest :: Error while fetching Locations: {}", throwable.toString());
});
.onFailure(throwable -> log.info("ItemUpdateProcessorForRequest :: Error while fetching Locations: {}", throwable.toString()));
}

private static Future<String> setEffectiveLocationData(Collection<Location> locations, String effectiveLocationId,
Expand All @@ -129,10 +127,8 @@ private Future<Object> setRetrievalServicePointData(String primaryServicePoint,
locationAndSpData.put(RETRIEVAL_SERVICE_POINT_NAME, retrievalServicePoint.getName());
}
return succeededFuture();
}).onFailure(throwable -> {
log.info("ItemUpdateProcessorForRequest :: Error while fetching ServicePoint: {}",
throwable.toString());
});
}).onFailure(throwable -> log.info("ItemUpdateProcessorForRequest :: Error while fetching ServicePoint: {}",
throwable.toString()));
}
return succeededFuture();
}
Expand Down

0 comments on commit 29b77fb

Please sign in to comment.