From 7f2ded68ef015684f90bef59c055a1c980688069 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sun, 11 Jun 2023 08:10:16 -0700 Subject: Clean up formatting --- src/main/java/org/traccar/reports/RouteReportProvider.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/main/java/org/traccar/reports') diff --git a/src/main/java/org/traccar/reports/RouteReportProvider.java b/src/main/java/org/traccar/reports/RouteReportProvider.java index a1d004dd1..5343652b7 100644 --- a/src/main/java/org/traccar/reports/RouteReportProvider.java +++ b/src/main/java/org/traccar/reports/RouteReportProvider.java @@ -50,6 +50,7 @@ public class RouteReportProvider { private final Config config; private final ReportUtils reportUtils; private final Storage storage; + private final Map namesCount = new HashMap<>(); @Inject @@ -72,9 +73,10 @@ public class RouteReportProvider { private String getUniqueSheetName(String key) { - namesCount.compute(key, (k, value) -> (value == null) ? 1 : (value + 1)); - return (namesCount.get(key) > 1 ? key + "-" + namesCount.get(key) : key); + namesCount.compute(key, (k, value) -> value == null ? 1 : (value + 1)); + return namesCount.get(key) > 1 ? key + '-' + namesCount.get(key) : key; } + public void getExcel(OutputStream outputStream, long userId, Collection deviceIds, Collection groupIds, Date from, Date to) throws StorageException, IOException { -- cgit v1.2.3