aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol/WialonProtocol.java
diff options
context:
space:
mode:
authorAnton Tananaev <atananaev@lyft.com>2020-12-29 13:05:07 -0800
committerAnton Tananaev <atananaev@lyft.com>2020-12-29 13:05:07 -0800
commitf94951e7e78956b2bbd438665ff290a472afde76 (patch)
tree21ae964507b4e4e3a3c7f657e9057375c35701d1 /src/main/java/org/traccar/protocol/WialonProtocol.java
parent152d8fe43e4e7c15308ea39a19ac6c10da871ef7 (diff)
downloadtrackermap-server-f94951e7e78956b2bbd438665ff290a472afde76.tar.gz
trackermap-server-f94951e7e78956b2bbd438665ff290a472afde76.tar.bz2
trackermap-server-f94951e7e78956b2bbd438665ff290a472afde76.zip
Migrate more boolean keys
Diffstat (limited to 'src/main/java/org/traccar/protocol/WialonProtocol.java')
-rw-r--r--src/main/java/org/traccar/protocol/WialonProtocol.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main/java/org/traccar/protocol/WialonProtocol.java b/src/main/java/org/traccar/protocol/WialonProtocol.java
index fd183dd2c..cb6ea5319 100644
--- a/src/main/java/org/traccar/protocol/WialonProtocol.java
+++ b/src/main/java/org/traccar/protocol/WialonProtocol.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 - 2019 Anton Tananaev (anton@traccar.org)
+ * Copyright 2015 - 2020 Anton Tananaev (anton@traccar.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,6 +19,7 @@ import org.traccar.BaseProtocol;
import org.traccar.Context;
import org.traccar.PipelineBuilder;
import org.traccar.TrackerServer;
+import org.traccar.config.Keys;
import org.traccar.model.Command;
import io.netty.handler.codec.LineBasedFrameDecoder;
@@ -26,6 +27,7 @@ import io.netty.handler.codec.string.StringDecoder;
import io.netty.handler.codec.string.StringEncoder;
import java.nio.charset.StandardCharsets;
+
public class WialonProtocol extends BaseProtocol {
public WialonProtocol() {
@@ -38,7 +40,7 @@ public class WialonProtocol extends BaseProtocol {
@Override
protected void addProtocolHandlers(PipelineBuilder pipeline) {
pipeline.addLast(new LineBasedFrameDecoder(4 * 1024));
- boolean utf8 = Context.getConfig().getBoolean(getName() + ".utf8");
+ boolean utf8 = Context.getConfig().getBoolean(Keys.PROTOCOL_UTF8.withPrefix(getName()));
if (utf8) {
pipeline.addLast(new StringEncoder(StandardCharsets.UTF_8));
pipeline.addLast(new StringDecoder(StandardCharsets.UTF_8));
@@ -54,7 +56,7 @@ public class WialonProtocol extends BaseProtocol {
@Override
protected void addProtocolHandlers(PipelineBuilder pipeline) {
pipeline.addLast(new LineBasedFrameDecoder(4 * 1024));
- boolean utf8 = Context.getConfig().getBoolean(getName() + ".utf8");
+ boolean utf8 = Context.getConfig().getBoolean(Keys.PROTOCOL_UTF8.withPrefix(getName()));
if (utf8) {
pipeline.addLast(new StringEncoder(StandardCharsets.UTF_8));
pipeline.addLast(new StringDecoder(StandardCharsets.UTF_8));