diff options
author | Anton Tananaev <anton@traccar.org> | 2022-10-02 08:39:06 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-10-02 08:39:06 -0700 |
commit | ae3eddba7e0a6688807f71d2c290618d1c49da05 (patch) | |
tree | c0ff0ed14f7ccfcd99973d16e8bcbe52045e8f5b /src/main/java/org/traccar/reports | |
parent | 63a8bb747e92cc98d64bad59464922a9f6be5867 (diff) | |
download | trackermap-server-ae3eddba7e0a6688807f71d2c290618d1c49da05.tar.gz trackermap-server-ae3eddba7e0a6688807f71d2c290618d1c49da05.tar.bz2 trackermap-server-ae3eddba7e0a6688807f71d2c290618d1c49da05.zip |
Use singletons where possible
Diffstat (limited to 'src/main/java/org/traccar/reports')
-rw-r--r-- | src/main/java/org/traccar/reports/common/ReportUtils.java | 2 | ||||
-rw-r--r-- | src/main/java/org/traccar/reports/common/TripsConfig.java | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/reports/common/ReportUtils.java b/src/main/java/org/traccar/reports/common/ReportUtils.java index 57ed4d148..1de774dab 100644 --- a/src/main/java/org/traccar/reports/common/ReportUtils.java +++ b/src/main/java/org/traccar/reports/common/ReportUtils.java @@ -52,6 +52,7 @@ import org.traccar.storage.query.Request; import javax.annotation.Nullable; import javax.inject.Inject; +import javax.inject.Singleton; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; @@ -67,6 +68,7 @@ import java.util.Locale; import java.util.Objects; import java.util.stream.Collectors; +@Singleton public class ReportUtils { private final Config config; diff --git a/src/main/java/org/traccar/reports/common/TripsConfig.java b/src/main/java/org/traccar/reports/common/TripsConfig.java index c28cbeed4..52db97b74 100644 --- a/src/main/java/org/traccar/reports/common/TripsConfig.java +++ b/src/main/java/org/traccar/reports/common/TripsConfig.java @@ -20,7 +20,9 @@ import org.traccar.config.Config; import org.traccar.config.Keys; import javax.inject.Inject; +import javax.inject.Singleton; +@Singleton public class TripsConfig { @Inject |