aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/BaseProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/BaseProtocolDecoder.java')
-rw-r--r--src/org/traccar/BaseProtocolDecoder.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/org/traccar/BaseProtocolDecoder.java b/src/org/traccar/BaseProtocolDecoder.java
index e1efbd3eb..aa5be612e 100644
--- a/src/org/traccar/BaseProtocolDecoder.java
+++ b/src/org/traccar/BaseProtocolDecoder.java
@@ -45,11 +45,12 @@ public abstract class BaseProtocolDecoder extends ExtendedObjectDecoder {
private final Config config = Context.getConfig();
private final IdentityManager identityManager = Context.getIdentityManager();
private final ConnectionManager connectionManager = Context.getConnectionManager();
- private final StatisticsManager statisticsManager = Context.getStatisticsManager();
+ private final StatisticsManager statisticsManager;
private final Protocol protocol;
public BaseProtocolDecoder(Protocol protocol) {
this.protocol = protocol;
+ statisticsManager = Main.getInjector() != null ? Main.getInjector().getInstance(StatisticsManager.class) : null;
}
public String getProtocolName() {