From 13b065fc4e8e1a4dc1f35312869151418fc660bd Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Wed, 21 Sep 2022 21:03:04 -0700 Subject: Reformat forwarding request --- .../org/traccar/notification/EventForwarder.java | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/org/traccar/notification/EventForwarder.java b/src/main/java/org/traccar/notification/EventForwarder.java index 279d5e678..50f17a852 100644 --- a/src/main/java/org/traccar/notification/EventForwarder.java +++ b/src/main/java/org/traccar/notification/EventForwarder.java @@ -68,18 +68,17 @@ public class EventForwarder { } LOGGER.debug("Event forwarding initiated"); - requestBuilder.async().post( - Entity.json(preparePayload(event, position)), new InvocationCallback() { - @Override - public void completed(Object o) { - LOGGER.debug("Event forwarding succeeded"); - } + requestBuilder.async().post(Entity.json(preparePayload(event, position)), new InvocationCallback<>() { + @Override + public void completed(Object o) { + LOGGER.debug("Event forwarding succeeded"); + } - @Override - public void failed(Throwable throwable) { - LOGGER.warn("Event forwarding failed", throwable); - } - }); + @Override + public void failed(Throwable throwable) { + LOGGER.warn("Event forwarding failed", throwable); + } + }); } protected Map preparePayload(Event event, Position position) { -- cgit v1.2.3