From 545f8f3e485151c3ac3d865d240c5cd0c4b2f058 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Wed, 17 Feb 2021 12:15:00 +0100 Subject: [PATCH] using jackson objectmapper instead of GSon to serialise the aggregation report --- .../eu/dnetlib/dhp/aggregation/common/AggregatorReport.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dhp-workflows/dhp-aggregation/src/main/java/eu/dnetlib/dhp/aggregation/common/AggregatorReport.java b/dhp-workflows/dhp-aggregation/src/main/java/eu/dnetlib/dhp/aggregation/common/AggregatorReport.java index 269f8f6e9..9f91c4247 100644 --- a/dhp-workflows/dhp-aggregation/src/main/java/eu/dnetlib/dhp/aggregation/common/AggregatorReport.java +++ b/dhp-workflows/dhp-aggregation/src/main/java/eu/dnetlib/dhp/aggregation/common/AggregatorReport.java @@ -8,6 +8,7 @@ import java.util.LinkedHashMap; import java.util.Map; import java.util.Objects; +import eu.dnetlib.dhp.utils.DHPUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -39,7 +40,7 @@ public class AggregatorReport extends LinkedHashMap implements C this.forEach((k, v) -> log.info("{} - {}", k, v)); Map m = new HashMap<>(); - m.put(getClass().getSimpleName().toLowerCase(), new Gson().toJson(values())); + m.put(getClass().getSimpleName().toLowerCase(), DHPUtils.MAPPER.writeValueAsString(values())); messageSender.sendReport(m); } }