aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/handler
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-06-15 19:08:58 -0700
committerAnton Tananaev <anton@traccar.org>2022-06-15 19:08:58 -0700
commitca884b765f3f7a642c435be886dbec40f9d1f661 (patch)
treeeb809ffe38faaf6e580fc2434beb9c4e0b3f90e5 /src/main/java/org/traccar/handler
parent63ecf80c11ec9bce19df18fc24ad863a9c2cb212 (diff)
downloadtrackermap-server-ca884b765f3f7a642c435be886dbec40f9d1f661.tar.gz
trackermap-server-ca884b765f3f7a642c435be886dbec40f9d1f661.tar.bz2
trackermap-server-ca884b765f3f7a642c435be886dbec40f9d1f661.zip
Convert some config usages
Diffstat (limited to 'src/main/java/org/traccar/handler')
-rw-r--r--src/main/java/org/traccar/handler/GeocoderHandler.java3
-rw-r--r--src/main/java/org/traccar/handler/TimeHandler.java3
2 files changed, 2 insertions, 4 deletions
diff --git a/src/main/java/org/traccar/handler/GeocoderHandler.java b/src/main/java/org/traccar/handler/GeocoderHandler.java
index 614cf97d6..075bdf815 100644
--- a/src/main/java/org/traccar/handler/GeocoderHandler.java
+++ b/src/main/java/org/traccar/handler/GeocoderHandler.java
@@ -20,7 +20,6 @@ import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.traccar.Context;
import org.traccar.config.Config;
import org.traccar.config.Keys;
import org.traccar.database.IdentityManager;
@@ -42,7 +41,7 @@ public class GeocoderHandler extends ChannelInboundHandlerAdapter {
Config config, Geocoder geocoder, IdentityManager identityManager) {
this.geocoder = geocoder;
this.identityManager = identityManager;
- ignorePositions = Context.getConfig().getBoolean(Keys.GEOCODER_IGNORE_POSITIONS);
+ ignorePositions = config.getBoolean(Keys.GEOCODER_IGNORE_POSITIONS);
processInvalidPositions = config.getBoolean(Keys.GEOCODER_PROCESS_INVALID_POSITIONS);
geocoderReuseDistance = config.getInteger(Keys.GEOCODER_REUSE_DISTANCE, 0);
}
diff --git a/src/main/java/org/traccar/handler/TimeHandler.java b/src/main/java/org/traccar/handler/TimeHandler.java
index c7e5e6e5c..439c076c7 100644
--- a/src/main/java/org/traccar/handler/TimeHandler.java
+++ b/src/main/java/org/traccar/handler/TimeHandler.java
@@ -19,7 +19,6 @@ import io.netty.channel.ChannelHandler;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
import org.traccar.BaseProtocolDecoder;
-import org.traccar.Context;
import org.traccar.config.Config;
import org.traccar.config.Keys;
import org.traccar.model.Position;
@@ -44,7 +43,7 @@ public class TimeHandler extends ChannelInboundHandlerAdapter {
} else {
useServerTime = false;
}
- String protocolList = Context.getConfig().getString(Keys.TIME_PROTOCOLS);
+ String protocolList = config.getString(Keys.TIME_PROTOCOLS);
if (protocolList != null) {
protocols = new HashSet<>(Arrays.asList(protocolList.split("[, ]")));
} else {