Skip to content

Commit

Permalink
fix(irs-api):[#755] use inline StringUtils.isblank for better readabi…
Browse files Browse the repository at this point in the history
…lity
  • Loading branch information
ds-jhartmann committed Aug 1, 2024
1 parent eb6794e commit 73d973f
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class CallbackResponderEventListener {
@Async
@EventListener
public void handleJobProcessingFinishedEvent(final JobProcessingFinishedEvent jobProcessingFinishedEvent) {
if (noCallbackUrlRegistered(jobProcessingFinishedEvent.callbackUrl())) {
if (StringUtils.isBlank(jobProcessingFinishedEvent.callbackUrl())) {
return;
}
log.info("Processing of job has finished - attempting to notify job requestor");
Expand All @@ -96,7 +96,7 @@ public void handleJobProcessingFinishedEvent(final JobProcessingFinishedEvent jo
@Async
@EventListener
public void handleBatchProcessingFinishedEvent(final BatchProcessingFinishedEvent batchProcessingFinishedEvent) {
if (noCallbackUrlRegistered(batchProcessingFinishedEvent.callbackUrl())) {
if (StringUtils.isBlank(batchProcessingFinishedEvent.callbackUrl())) {
return;
}
log.info("Processing of Batch has finished - attempting to notify requestor");
Expand All @@ -120,7 +120,7 @@ public void handleBatchProcessingFinishedEvent(final BatchProcessingFinishedEven
@EventListener
public void handleBatchOrderProcessingFinishedEvent(
final BatchOrderProcessingFinishedEvent batchOrderProcessingFinishedEvent) {
if (noCallbackUrlRegistered(batchOrderProcessingFinishedEvent.callbackUrl())) {
if (StringUtils.isBlank(batchOrderProcessingFinishedEvent.callbackUrl())) {
return;
}
log.info("Processing of Batch Order has finished - attempting to notify requestor");
Expand Down Expand Up @@ -179,10 +179,6 @@ private boolean callbackNotSentYet(final String key) {
}
}

private boolean noCallbackUrlRegistered(final String callbackUrl) {
return !StringUtils.isNotBlank(callbackUrl);
}

@SuppressWarnings("PMD.UseConcurrentHashMap")
private URI buildCallbackUri(final String callbackUrl, final String jobId, final JobState jobState) {
final Map<String, Object> uriVariables = new HashMap<>();
Expand Down

0 comments on commit 73d973f

Please sign in to comment.