aboutsummaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-10-20 10:35:27 +0400
committerAnton Tananaev <anton.tananaev@gmail.com>2018-10-20 10:35:27 +0400
commita3412e9cca5baf09859d7e5bbfe660d68716f7c7 (patch)
tree940c5c5316778838a8dbc91e5d3612a1eb9572fe /src/org
parentf3563488df041d84b06265dbf792774e2bab4637 (diff)
downloadtrackermap-server-a3412e9cca5baf09859d7e5bbfe660d68716f7c7.tar.gz
trackermap-server-a3412e9cca5baf09859d7e5bbfe660d68716f7c7.tar.bz2
trackermap-server-a3412e9cca5baf09859d7e5bbfe660d68716f7c7.zip
Fix some Java issues
Diffstat (limited to 'src/org')
-rw-r--r--src/org/traccar/WindowsService.java2
-rw-r--r--src/org/traccar/protocol/AnytrekProtocolDecoder.java2
-rw-r--r--src/org/traccar/protocol/CellocatorFrameDecoder.java4
-rw-r--r--src/org/traccar/protocol/EelinkProtocolEncoder.java4
4 files changed, 2 insertions, 10 deletions
diff --git a/src/org/traccar/WindowsService.java b/src/org/traccar/WindowsService.java
index 263d75a0e..158aa5540 100644
--- a/src/org/traccar/WindowsService.java
+++ b/src/org/traccar/WindowsService.java
@@ -140,7 +140,7 @@ public abstract class WindowsService {
Advapi32.INSTANCE.CloseServiceHandle(serviceManager);
}
- return (success);
+ return success;
}
public void init() throws URISyntaxException {
diff --git a/src/org/traccar/protocol/AnytrekProtocolDecoder.java b/src/org/traccar/protocol/AnytrekProtocolDecoder.java
index 7665e6cfd..c48f59c90 100644
--- a/src/org/traccar/protocol/AnytrekProtocolDecoder.java
+++ b/src/org/traccar/protocol/AnytrekProtocolDecoder.java
@@ -48,7 +48,7 @@ public class AnytrekProtocolDecoder extends BaseProtocolDecoder {
response.writeShortLE(0); // checksum
response.writeByte('\r');
response.writeByte('\n');
- channel.writeAndFlush(new NetworkMessage(response, channel.remoteAddress()));
+ channel.writeAndFlush(new NetworkMessage(response, remoteAddress));
}
}
diff --git a/src/org/traccar/protocol/CellocatorFrameDecoder.java b/src/org/traccar/protocol/CellocatorFrameDecoder.java
index 9bf9601fe..7d5499d92 100644
--- a/src/org/traccar/protocol/CellocatorFrameDecoder.java
+++ b/src/org/traccar/protocol/CellocatorFrameDecoder.java
@@ -18,14 +18,10 @@ package org.traccar.protocol;
import io.netty.buffer.ByteBuf;
import io.netty.channel.Channel;
import io.netty.channel.ChannelHandlerContext;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import org.traccar.BaseFrameDecoder;
public class CellocatorFrameDecoder extends BaseFrameDecoder {
- private static final Logger LOGGER = LoggerFactory.getLogger(CellocatorFrameDecoder.class);
-
private static final int MESSAGE_MINIMUM_LENGTH = 15;
@Override
diff --git a/src/org/traccar/protocol/EelinkProtocolEncoder.java b/src/org/traccar/protocol/EelinkProtocolEncoder.java
index c3ff88e1e..c005fbc67 100644
--- a/src/org/traccar/protocol/EelinkProtocolEncoder.java
+++ b/src/org/traccar/protocol/EelinkProtocolEncoder.java
@@ -17,8 +17,6 @@ package org.traccar.protocol;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import org.traccar.BaseProtocolEncoder;
import org.traccar.helper.DataConverter;
import org.traccar.model.Command;
@@ -28,8 +26,6 @@ import java.nio.charset.StandardCharsets;
public class EelinkProtocolEncoder extends BaseProtocolEncoder {
- private static final Logger LOGGER = LoggerFactory.getLogger(EelinkProtocolEncoder.class);
-
private boolean connectionless;
public EelinkProtocolEncoder(boolean connectionless) {