From 946968ca71188029a336b2bef1156ab0fe16605f Mon Sep 17 00:00:00 2001 From: Becky Reamy Date: Thu, 23 Apr 2020 10:34:43 -0400 Subject: [PATCH] KPMP-1813: Do not double log errors --- .../java/org/kpmp/stateManager/NotificationHandler.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/main/java/org/kpmp/stateManager/NotificationHandler.java b/src/main/java/org/kpmp/stateManager/NotificationHandler.java index 03feead..f4779a7 100644 --- a/src/main/java/org/kpmp/stateManager/NotificationHandler.java +++ b/src/main/java/org/kpmp/stateManager/NotificationHandler.java @@ -1,7 +1,5 @@ package org.kpmp.stateManager; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; import org.springframework.web.client.RestTemplate; @@ -9,7 +7,6 @@ @Component class NotificationHandler { - private static final Log logger = LogFactory.getLog(NotificationHandler.class); @Value("${notification.service.host}") private String notificationServiceHost; @Value("${notification.endpoint}") @@ -22,13 +19,9 @@ public NotificationHandler(RestTemplate restTemplate) { public void sendNotification(String packageId, String state, String origin, String codicil) { - Boolean response = restTemplate.postForObject(notificationServiceHost + notificationEndpoint, + restTemplate.postForObject(notificationServiceHost + notificationEndpoint, new StateChangeEvent(origin, packageId, state, codicil), Boolean.class); - if (!response) { - logger.error("URI: NotificationHandler.sendNotification | PKGID: " + packageId - + " | MSG: Notification message failed to send."); - } } }