aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-09-23 16:57:02 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-09-23 16:57:02 +1200
commitd997825008a0a1b0a6c29cc45e381cd239aa3572 (patch)
treef21c058b1cedb5ffe041f2ee199b4bd0e6329b93
parent23b09f83989a4b012bc2387fb6e180baccf9a60c (diff)
downloadtrackermap-server-d997825008a0a1b0a6c29cc45e381cd239aa3572.tar.gz
trackermap-server-d997825008a0a1b0a6c29cc45e381cd239aa3572.tar.bz2
trackermap-server-d997825008a0a1b0a6c29cc45e381cd239aa3572.zip
Clean up code inspection issues
-rw-r--r--src/org/traccar/geocode/GisgraphyReverseGeocoder.java6
-rw-r--r--src/org/traccar/geocode/JsonReverseGeocoder.java2
-rw-r--r--src/org/traccar/geocode/NominatimReverseGeocoder.java10
-rw-r--r--src/org/traccar/helper/ChannelBufferTools.java8
-rw-r--r--src/org/traccar/protocol/Ardi01ProtocolDecoder.java1
-rw-r--r--src/org/traccar/protocol/Avl301ProtocolDecoder.java1
-rw-r--r--src/org/traccar/protocol/BceFrameDecoder.java1
-rw-r--r--src/org/traccar/protocol/BoxProtocolDecoder.java2
-rw-r--r--src/org/traccar/protocol/CarTrackProtocolDecoder.java14
-rw-r--r--src/org/traccar/protocol/CarscopProtocolDecoder.java2
-rw-r--r--src/org/traccar/protocol/CellocatorProtocolDecoder.java3
-rw-r--r--src/org/traccar/protocol/EasyTrackProtocolDecoder.java2
-rw-r--r--src/org/traccar/protocol/EnforaProtocolDecoder.java3
-rw-r--r--src/org/traccar/protocol/Ev603ProtocolDecoder.java8
-rw-r--r--src/org/traccar/protocol/FreedomProtocolDecoder.java1
-rw-r--r--src/org/traccar/protocol/GalileoProtocolDecoder.java4
-rw-r--r--src/org/traccar/protocol/GatorProtocolDecoder.java1
-rw-r--r--src/org/traccar/protocol/Gl100ProtocolDecoder.java1
-rw-r--r--src/org/traccar/protocol/Gl200ProtocolDecoder.java2
-rw-r--r--src/org/traccar/protocol/GotopProtocolDecoder.java1
-rw-r--r--src/org/traccar/protocol/GpsGateProtocolDecoder.java1
-rw-r--r--src/org/traccar/protocol/GpsMarkerProtocol.java3
-rw-r--r--src/org/traccar/protocol/GpsmtaProtocol.java2
-rw-r--r--src/org/traccar/protocol/GpsmtaProtocolDecoder.java2
-rw-r--r--src/org/traccar/protocol/Gt02ProtocolDecoder.java1
-rw-r--r--src/org/traccar/protocol/Gt06ProtocolEncoder.java1
-rw-r--r--src/org/traccar/protocol/H02ProtocolDecoder.java1
-rw-r--r--src/org/traccar/protocol/HaicomProtocolDecoder.java3
-rw-r--r--src/org/traccar/protocol/IntellitracProtocolDecoder.java1
-rw-r--r--src/org/traccar/protocol/Jt600ProtocolDecoder.java1
-rw-r--r--src/org/traccar/protocol/KhdProtocolDecoder.java1
-rw-r--r--src/org/traccar/protocol/LaipacProtocolDecoder.java1
-rw-r--r--src/org/traccar/protocol/M2mProtocolDecoder.java1
-rw-r--r--src/org/traccar/protocol/ManPowerProtocolDecoder.java1
-rw-r--r--src/org/traccar/protocol/MaxonProtocolDecoder.java1
-rw-r--r--src/org/traccar/protocol/MeitrackProtocolDecoder.java1
-rw-r--r--src/org/traccar/protocol/MiniFinderProtocolDecoder.java3
-rw-r--r--src/org/traccar/protocol/Mta6ProtocolDecoder.java1
-rw-r--r--src/org/traccar/protocol/MtxProtocolDecoder.java1
-rw-r--r--src/org/traccar/protocol/MxtProtocolDecoder.java1
-rw-r--r--src/org/traccar/protocol/OrionProtocolDecoder.java1
-rw-r--r--src/org/traccar/protocol/PiligrimProtocolDecoder.java1
-rw-r--r--src/org/traccar/protocol/ProgressProtocolDecoder.java1
-rw-r--r--src/org/traccar/protocol/Pt3000ProtocolDecoder.java3
-rw-r--r--src/org/traccar/protocol/RitiProtocolDecoder.java1
-rw-r--r--src/org/traccar/protocol/SanavProtocolDecoder.java1
-rw-r--r--src/org/traccar/protocol/Stl060ProtocolDecoder.java1
-rw-r--r--src/org/traccar/protocol/TaipProtocolDecoder.java2
-rw-r--r--src/org/traccar/protocol/TelikProtocolDecoder.java1
-rw-r--r--src/org/traccar/protocol/Tk102ProtocolDecoder.java1
-rw-r--r--src/org/traccar/protocol/Tlt2hProtocolDecoder.java1
-rw-r--r--src/org/traccar/protocol/TopflytechProtocolDecoder.java1
-rw-r--r--src/org/traccar/protocol/Tr20ProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/TrackboxProtocolDecoder.java1
-rw-r--r--src/org/traccar/protocol/TramigoFrameDecoder.java1
-rw-r--r--src/org/traccar/protocol/TramigoProtocolDecoder.java1
-rw-r--r--src/org/traccar/protocol/V680ProtocolDecoder.java1
-rw-r--r--src/org/traccar/protocol/VisiontekProtocolDecoder.java1
-rw-r--r--src/org/traccar/protocol/WialonProtocolDecoder.java1
-rw-r--r--src/org/traccar/protocol/WondexProtocolDecoder.java1
-rw-r--r--src/org/traccar/protocol/XexunProtocolDecoder.java1
-rw-r--r--src/org/traccar/protocol/Xt013ProtocolDecoder.java1
-rw-r--r--src/org/traccar/protocol/YwtProtocolDecoder.java1
-rw-r--r--src/org/traccar/web/JsonConverter.java3
-rw-r--r--test/org/traccar/DetectorHandlerTest.java20
-rw-r--r--test/org/traccar/geocode/ReverseGeocoderTest.java3
-rw-r--r--test/org/traccar/helper/DecoderVerifier.java1
-rw-r--r--test/org/traccar/protocol/ApelProtocolDecoderTest.java5
-rw-r--r--test/org/traccar/protocol/Ardi01ProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/AutoFon45ProtocolDecoderTest.java1
-rw-r--r--test/org/traccar/protocol/AutoFonProtocolDecoderTest.java1
-rw-r--r--test/org/traccar/protocol/BceProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/BoxProtocolDecoderTest.java1
-rw-r--r--test/org/traccar/protocol/CarTrackProtocolDecoderTest.java1
-rw-r--r--test/org/traccar/protocol/CarscopProtocolDecoderTest.java3
-rw-r--r--test/org/traccar/protocol/CellocatorProtocolDecoderTest.java1
-rw-r--r--test/org/traccar/protocol/EasyTrackProtocolDecoderTest.java1
-rw-r--r--test/org/traccar/protocol/EnforaProtocolDecoderTest.java4
-rw-r--r--test/org/traccar/protocol/Ev603ProtocolDecoderTest.java1
-rw-r--r--test/org/traccar/protocol/FreedomProtocolDecoderTest.java3
-rw-r--r--test/org/traccar/protocol/GalileoProtocolDecoderTest.java1
-rw-r--r--test/org/traccar/protocol/GatorProtocolDecoderTest.java1
-rw-r--r--test/org/traccar/protocol/Gl100ProtocolDecoderTest.java1
-rw-r--r--test/org/traccar/protocol/GotopProtocolDecoderTest.java1
-rw-r--r--test/org/traccar/protocol/GpsGateProtocolDecoderTest.java1
-rw-r--r--test/org/traccar/protocol/GpsmtaProtocolDecoderTest.java1
-rw-r--r--test/org/traccar/protocol/Gt02ProtocolDecoderTest.java1
-rw-r--r--test/org/traccar/protocol/H02ProtocolDecoderTest.java1
-rw-r--r--test/org/traccar/protocol/HaicomProtocolDecoderTest.java1
-rw-r--r--test/org/traccar/protocol/Jt600ProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/KhdProtocolDecoderTest.java1
-rw-r--r--test/org/traccar/protocol/LaipacProtocolDecoderTest.java1
-rw-r--r--test/org/traccar/protocol/M2mProtocolDecoderTest.java1
-rw-r--r--test/org/traccar/protocol/ManPowerProtocolDecoderTest.java1
-rw-r--r--test/org/traccar/protocol/MiniFinderProtocolDecoderTest.java1
-rw-r--r--test/org/traccar/protocol/MtxProtocolDecoderTest.java3
-rw-r--r--test/org/traccar/protocol/NavigilProtocolDecoderTest.java1
-rw-r--r--test/org/traccar/protocol/NavisProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/OrionProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/PiligrimProtocolDecoderTest.java3
-rw-r--r--test/org/traccar/protocol/ProgressProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/Pt3000ProtocolDecoderTest.java1
-rw-r--r--test/org/traccar/protocol/RitiProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/SanavProtocolDecoderTest.java1
-rw-r--r--test/org/traccar/protocol/SkypatrolProtocolDecoderTest.java1
-rw-r--r--test/org/traccar/protocol/TelikProtocolDecoderTest.java1
-rw-r--r--test/org/traccar/protocol/TeltonikaProtocolDecoderTest.java1
-rw-r--r--test/org/traccar/protocol/Tk102ProtocolDecoderTest.java1
-rw-r--r--test/org/traccar/protocol/Tlt2hProtocolDecoderTest.java1
-rw-r--r--test/org/traccar/protocol/TopflytechProtocolDecoderTest.java3
-rw-r--r--test/org/traccar/protocol/TotemProtocolDecoderTest.java1
-rw-r--r--test/org/traccar/protocol/Tr20ProtocolDecoderTest.java1
-rw-r--r--test/org/traccar/protocol/TrackboxProtocolDecoderTest.java1
-rw-r--r--test/org/traccar/protocol/TytanProtocolDecoderTest.java3
-rw-r--r--test/org/traccar/protocol/UlbotechProtocolDecoderTest.java1
-rw-r--r--test/org/traccar/protocol/V680ProtocolDecoderTest.java1
-rw-r--r--test/org/traccar/protocol/WialonProtocolDecoderTest.java1
-rw-r--r--test/org/traccar/protocol/WondexProtocolDecoderTest.java1
-rw-r--r--test/org/traccar/protocol/Xt013ProtocolDecoderTest.java1
-rw-r--r--test/org/traccar/protocol/YwtProtocolDecoderTest.java1
-rw-r--r--test/org/traccar/web/JsonConverterTest.java1
121 files changed, 29 insertions, 209 deletions
diff --git a/src/org/traccar/geocode/GisgraphyReverseGeocoder.java b/src/org/traccar/geocode/GisgraphyReverseGeocoder.java
index 6e0e5a343..59c4de723 100644
--- a/src/org/traccar/geocode/GisgraphyReverseGeocoder.java
+++ b/src/org/traccar/geocode/GisgraphyReverseGeocoder.java
@@ -15,13 +15,7 @@
*/
package org.traccar.geocode;
-import org.traccar.helper.Log;
-
-import javax.json.Json;
import javax.json.JsonObject;
-import java.io.InputStreamReader;
-import java.net.URL;
-import java.net.URLConnection;
public class GisgraphyReverseGeocoder extends JsonReverseGeocoder {
diff --git a/src/org/traccar/geocode/JsonReverseGeocoder.java b/src/org/traccar/geocode/JsonReverseGeocoder.java
index 442b8551c..fd86f06d5 100644
--- a/src/org/traccar/geocode/JsonReverseGeocoder.java
+++ b/src/org/traccar/geocode/JsonReverseGeocoder.java
@@ -21,10 +21,8 @@ import javax.json.Json;
import javax.json.JsonObject;
import javax.json.JsonReader;
import java.io.InputStreamReader;
-import java.io.Reader;
import java.net.HttpURLConnection;
import java.net.URL;
-import java.net.URLConnection;
import java.util.AbstractMap;
import java.util.LinkedHashMap;
import java.util.Map;
diff --git a/src/org/traccar/geocode/NominatimReverseGeocoder.java b/src/org/traccar/geocode/NominatimReverseGeocoder.java
index 96c9a993d..95dfdeeb2 100644
--- a/src/org/traccar/geocode/NominatimReverseGeocoder.java
+++ b/src/org/traccar/geocode/NominatimReverseGeocoder.java
@@ -15,17 +15,7 @@
*/
package org.traccar.geocode;
-import java.io.InputStreamReader;
-import java.net.URL;
-import java.net.URLConnection;
-import javax.json.Json;
-import javax.json.JsonArray;
import javax.json.JsonObject;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-
-import org.traccar.helper.Log;
-import org.w3c.dom.Document;
public class NominatimReverseGeocoder extends JsonReverseGeocoder {
diff --git a/src/org/traccar/helper/ChannelBufferTools.java b/src/org/traccar/helper/ChannelBufferTools.java
index 1ebe89666..12e8fc93d 100644
--- a/src/org/traccar/helper/ChannelBufferTools.java
+++ b/src/org/traccar/helper/ChannelBufferTools.java
@@ -15,14 +15,10 @@
*/
package org.traccar.helper;
-import java.math.BigInteger;
-import java.util.Formatter;
import org.jboss.netty.buffer.ChannelBuffer;
-import org.traccar.protocol.IntellitracFrameDecoder;
-/**
- * ChannelBuffer helper methods
- */
+import java.util.Formatter;
+
public class ChannelBufferTools {
public static Integer find(ChannelBuffer buf, int start, String subString) {
diff --git a/src/org/traccar/protocol/Ardi01ProtocolDecoder.java b/src/org/traccar/protocol/Ardi01ProtocolDecoder.java
index 0a0ef0bca..723c5ddd6 100644
--- a/src/org/traccar/protocol/Ardi01ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Ardi01ProtocolDecoder.java
@@ -16,7 +16,6 @@
package org.traccar.protocol;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.helper.UnitsConverter;
import org.traccar.model.Event;
diff --git a/src/org/traccar/protocol/Avl301ProtocolDecoder.java b/src/org/traccar/protocol/Avl301ProtocolDecoder.java
index 6359ba80d..8116958da 100644
--- a/src/org/traccar/protocol/Avl301ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Avl301ProtocolDecoder.java
@@ -18,7 +18,6 @@ package org.traccar.protocol;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.model.Event;
import org.traccar.model.Position;
diff --git a/src/org/traccar/protocol/BceFrameDecoder.java b/src/org/traccar/protocol/BceFrameDecoder.java
index 8accc02d8..1f8b8efcd 100644
--- a/src/org/traccar/protocol/BceFrameDecoder.java
+++ b/src/org/traccar/protocol/BceFrameDecoder.java
@@ -19,7 +19,6 @@ import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.channel.Channel;
import org.jboss.netty.channel.ChannelHandlerContext;
import org.jboss.netty.handler.codec.frame.FrameDecoder;
-import org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder;
public class BceFrameDecoder extends FrameDecoder {
diff --git a/src/org/traccar/protocol/BoxProtocolDecoder.java b/src/org/traccar/protocol/BoxProtocolDecoder.java
index 821d1baae..3ec0dc9bd 100644
--- a/src/org/traccar/protocol/BoxProtocolDecoder.java
+++ b/src/org/traccar/protocol/BoxProtocolDecoder.java
@@ -22,8 +22,6 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
-
import org.traccar.BaseProtocolDecoder;
import org.traccar.helper.UnitsConverter;
import org.traccar.model.Event;
diff --git a/src/org/traccar/protocol/CarTrackProtocolDecoder.java b/src/org/traccar/protocol/CarTrackProtocolDecoder.java
index fc14b4668..a5089d227 100644
--- a/src/org/traccar/protocol/CarTrackProtocolDecoder.java
+++ b/src/org/traccar/protocol/CarTrackProtocolDecoder.java
@@ -23,8 +23,6 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
-
import org.traccar.BaseProtocolDecoder;
import org.traccar.model.Event;
import org.traccar.model.Position;
@@ -38,9 +36,9 @@ public class CarTrackProtocolDecoder extends BaseProtocolDecoder {
private static final Pattern pattern = Pattern.compile(
"\\$\\$" + // Header
"(\\d+)\\?*" + // Device ID
- "\\&A" +
+ "&A" +
"(\\d{4})" + // Command - 2
- "\\&B" +
+ "&B" +
"(\\d{2})(\\d{2})(\\d{2})\\.(\\d{3})," + // HHMMSS.DDD
"([AV])," + // STATUS : A= Valid, V = Invalid
"(\\d{2})(\\d{2}\\.\\d{4})," + // Lat : XXMM.DDDDD
@@ -51,10 +49,10 @@ public class CarTrackProtocolDecoder extends BaseProtocolDecoder {
"(\\d+.\\d*)?," + // Heading
"(\\d{2})(\\d{2})(\\d{2})" + // DDMMYY
".*" +
- "\\&C(.*)" + // IO Port Data
- "\\&D(.*)" + // Mile Meter Data
- "\\&E(.*)" + // Alarm Data
- "(?:\\&Y)?(.*)"); // AD Input Data
+ "&C(.*)" + // IO Port Data
+ "&D(.*)" + // Mile Meter Data
+ "&E(.*)" + // Alarm Data
+ "(?:&Y)?(.*)"); // AD Input Data
@Override
protected Object decode(
diff --git a/src/org/traccar/protocol/CarscopProtocolDecoder.java b/src/org/traccar/protocol/CarscopProtocolDecoder.java
index 08ab10528..3b2eb0016 100644
--- a/src/org/traccar/protocol/CarscopProtocolDecoder.java
+++ b/src/org/traccar/protocol/CarscopProtocolDecoder.java
@@ -22,8 +22,6 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
-
import org.traccar.BaseProtocolDecoder;
import org.traccar.model.Event;
import org.traccar.model.Position;
diff --git a/src/org/traccar/protocol/CellocatorProtocolDecoder.java b/src/org/traccar/protocol/CellocatorProtocolDecoder.java
index af148c1eb..4aab9c207 100644
--- a/src/org/traccar/protocol/CellocatorProtocolDecoder.java
+++ b/src/org/traccar/protocol/CellocatorProtocolDecoder.java
@@ -22,9 +22,8 @@ import java.util.TimeZone;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
-import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
+import org.jboss.netty.channel.Channel;
import org.traccar.BaseProtocolDecoder;
import org.traccar.helper.UnitsConverter;
import org.traccar.model.Event;
diff --git a/src/org/traccar/protocol/EasyTrackProtocolDecoder.java b/src/org/traccar/protocol/EasyTrackProtocolDecoder.java
index 5292e90a7..0e4c60878 100644
--- a/src/org/traccar/protocol/EasyTrackProtocolDecoder.java
+++ b/src/org/traccar/protocol/EasyTrackProtocolDecoder.java
@@ -22,8 +22,6 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
-
import org.traccar.BaseProtocolDecoder;
import org.traccar.model.Event;
import org.traccar.model.Position;
diff --git a/src/org/traccar/protocol/EnforaProtocolDecoder.java b/src/org/traccar/protocol/EnforaProtocolDecoder.java
index 353547aef..91e18eadd 100644
--- a/src/org/traccar/protocol/EnforaProtocolDecoder.java
+++ b/src/org/traccar/protocol/EnforaProtocolDecoder.java
@@ -23,9 +23,8 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.jboss.netty.buffer.ChannelBuffer;
-import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
+import org.jboss.netty.channel.Channel;
import org.traccar.BaseProtocolDecoder;
import org.traccar.helper.ChannelBufferTools;
import org.traccar.helper.Log;
diff --git a/src/org/traccar/protocol/Ev603ProtocolDecoder.java b/src/org/traccar/protocol/Ev603ProtocolDecoder.java
index 898e5802d..a15e68f86 100644
--- a/src/org/traccar/protocol/Ev603ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Ev603ProtocolDecoder.java
@@ -16,19 +16,17 @@
*/
package org.traccar.protocol;
-import java.net.SocketAddress;
+import java.net.SocketAddress;
import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
-
import org.traccar.BaseProtocolDecoder;
import org.traccar.model.Position;
-public class Ev603ProtocolDecoder extends BaseProtocolDecoder{
+public class Ev603ProtocolDecoder extends BaseProtocolDecoder {
public Ev603ProtocolDecoder(Ev603Protocol protocol) {
super(protocol);
@@ -36,7 +34,7 @@ public class Ev603ProtocolDecoder extends BaseProtocolDecoder{
private static final Pattern pattern = Pattern.compile(
"!.," + // Type
- "(\\d{2})\\/(\\d{2})\\/(\\d{2})," + // Date dd/mm/YY
+ "(\\d{2})/(\\d{2})/(\\d{2})," + // Date dd/mm/YY
"(\\d{2}):(\\d{2}):(\\d{2})," + // Time hh:mm:ss
"(-?\\d+\\.\\d+)," + // Latitude
"(-?\\d+\\.\\d+)," + // Longitude
diff --git a/src/org/traccar/protocol/FreedomProtocolDecoder.java b/src/org/traccar/protocol/FreedomProtocolDecoder.java
index b095b9a39..5f2cd3f2f 100644
--- a/src/org/traccar/protocol/FreedomProtocolDecoder.java
+++ b/src/org/traccar/protocol/FreedomProtocolDecoder.java
@@ -22,7 +22,6 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.model.Position;
diff --git a/src/org/traccar/protocol/GalileoProtocolDecoder.java b/src/org/traccar/protocol/GalileoProtocolDecoder.java
index b9a4eef44..37a31de6e 100644
--- a/src/org/traccar/protocol/GalileoProtocolDecoder.java
+++ b/src/org/traccar/protocol/GalileoProtocolDecoder.java
@@ -91,8 +91,8 @@ public class GalileoProtocolDecoder extends BaseProtocolDecoder {
buf.readUnsignedByte(); // header
int length = (buf.readUnsignedShort() & 0x7fff) + 3;
- List<Position> positions = new LinkedList<Position>();
- Set<Integer> tags = new HashSet<Integer>();
+ List<Position> positions = new LinkedList<>();
+ Set<Integer> tags = new HashSet<>();
boolean hasLocation = false;
Position position = new Position();
position.setProtocol(getProtocolName());
diff --git a/src/org/traccar/protocol/GatorProtocolDecoder.java b/src/org/traccar/protocol/GatorProtocolDecoder.java
index 635362f48..d17e0f2f7 100644
--- a/src/org/traccar/protocol/GatorProtocolDecoder.java
+++ b/src/org/traccar/protocol/GatorProtocolDecoder.java
@@ -21,7 +21,6 @@ import java.util.TimeZone;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.helper.ChannelBufferTools;
diff --git a/src/org/traccar/protocol/Gl100ProtocolDecoder.java b/src/org/traccar/protocol/Gl100ProtocolDecoder.java
index ffb4605a0..26102e925 100644
--- a/src/org/traccar/protocol/Gl100ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Gl100ProtocolDecoder.java
@@ -22,7 +22,6 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.model.Position;
diff --git a/src/org/traccar/protocol/Gl200ProtocolDecoder.java b/src/org/traccar/protocol/Gl200ProtocolDecoder.java
index 23afa2c4c..503717eba 100644
--- a/src/org/traccar/protocol/Gl200ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Gl200ProtocolDecoder.java
@@ -34,7 +34,7 @@ public class Gl200ProtocolDecoder extends BaseProtocolDecoder {
}
private static final Pattern heartbeatPattern = Pattern.compile(
- "\\+ACK\\:GTHBD," +
+ "\\+ACK:GTHBD," +
"([0-9A-Z]{2}\\p{XDigit}{4})," +
".*," +
"(\\p{XDigit}{4})\\$?");
diff --git a/src/org/traccar/protocol/GotopProtocolDecoder.java b/src/org/traccar/protocol/GotopProtocolDecoder.java
index f113afad5..5bd2f8038 100644
--- a/src/org/traccar/protocol/GotopProtocolDecoder.java
+++ b/src/org/traccar/protocol/GotopProtocolDecoder.java
@@ -22,7 +22,6 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.helper.UnitsConverter;
diff --git a/src/org/traccar/protocol/GpsGateProtocolDecoder.java b/src/org/traccar/protocol/GpsGateProtocolDecoder.java
index 5a69d6621..d76ef6aed 100644
--- a/src/org/traccar/protocol/GpsGateProtocolDecoder.java
+++ b/src/org/traccar/protocol/GpsGateProtocolDecoder.java
@@ -22,7 +22,6 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.helper.Crc;
diff --git a/src/org/traccar/protocol/GpsMarkerProtocol.java b/src/org/traccar/protocol/GpsMarkerProtocol.java
index 7961e2340..3ac827ea7 100644
--- a/src/org/traccar/protocol/GpsMarkerProtocol.java
+++ b/src/org/traccar/protocol/GpsMarkerProtocol.java
@@ -15,17 +15,14 @@
*/
package org.traccar.protocol;
-import org.jboss.netty.bootstrap.ConnectionlessBootstrap;
import org.jboss.netty.bootstrap.ServerBootstrap;
import org.jboss.netty.channel.ChannelPipeline;
import org.jboss.netty.handler.codec.string.StringDecoder;
-import org.jboss.netty.handler.codec.string.StringEncoder;
import org.traccar.BaseProtocol;
import org.traccar.CharacterDelimiterFrameDecoder;
import org.traccar.TrackerServer;
import java.util.List;
-import java.util.Map;
public class GpsMarkerProtocol extends BaseProtocol {
diff --git a/src/org/traccar/protocol/GpsmtaProtocol.java b/src/org/traccar/protocol/GpsmtaProtocol.java
index 41e7ad8b8..28974855d 100644
--- a/src/org/traccar/protocol/GpsmtaProtocol.java
+++ b/src/org/traccar/protocol/GpsmtaProtocol.java
@@ -17,9 +17,7 @@ package org.traccar.protocol;
import org.jboss.netty.bootstrap.ServerBootstrap;
import org.jboss.netty.channel.ChannelPipeline;
-import org.jboss.netty.handler.codec.frame.LineBasedFrameDecoder;
import org.jboss.netty.handler.codec.string.StringDecoder;
-import org.jboss.netty.handler.codec.string.StringEncoder;
import org.traccar.BaseProtocol;
import org.traccar.TrackerServer;
diff --git a/src/org/traccar/protocol/GpsmtaProtocolDecoder.java b/src/org/traccar/protocol/GpsmtaProtocolDecoder.java
index 32648bc5e..003d833ee 100644
--- a/src/org/traccar/protocol/GpsmtaProtocolDecoder.java
+++ b/src/org/traccar/protocol/GpsmtaProtocolDecoder.java
@@ -21,9 +21,7 @@ import org.traccar.model.Event;
import org.traccar.model.Position;
import java.net.SocketAddress;
-import java.util.Calendar;
import java.util.Date;
-import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
diff --git a/src/org/traccar/protocol/Gt02ProtocolDecoder.java b/src/org/traccar/protocol/Gt02ProtocolDecoder.java
index 14091eb6f..5d1a03c77 100644
--- a/src/org/traccar/protocol/Gt02ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Gt02ProtocolDecoder.java
@@ -22,7 +22,6 @@ import java.util.TimeZone;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.helper.UnitsConverter;
diff --git a/src/org/traccar/protocol/Gt06ProtocolEncoder.java b/src/org/traccar/protocol/Gt06ProtocolEncoder.java
index 22d62e9e5..82c689d9e 100644
--- a/src/org/traccar/protocol/Gt06ProtocolEncoder.java
+++ b/src/org/traccar/protocol/Gt06ProtocolEncoder.java
@@ -18,7 +18,6 @@ package org.traccar.protocol;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
import org.traccar.BaseProtocolEncoder;
-import org.traccar.Context;
import org.traccar.helper.Crc;
import org.traccar.model.Command;
diff --git a/src/org/traccar/protocol/H02ProtocolDecoder.java b/src/org/traccar/protocol/H02ProtocolDecoder.java
index 666d868f7..ea7a6ad9e 100644
--- a/src/org/traccar/protocol/H02ProtocolDecoder.java
+++ b/src/org/traccar/protocol/H02ProtocolDecoder.java
@@ -24,7 +24,6 @@ import java.util.regex.Pattern;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.helper.BitUtil;
diff --git a/src/org/traccar/protocol/HaicomProtocolDecoder.java b/src/org/traccar/protocol/HaicomProtocolDecoder.java
index b7cc29ddf..21a517697 100644
--- a/src/org/traccar/protocol/HaicomProtocolDecoder.java
+++ b/src/org/traccar/protocol/HaicomProtocolDecoder.java
@@ -22,7 +22,6 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.model.Event;
@@ -51,7 +50,7 @@ public class HaicomProtocolDecoder extends BaseProtocolDecoder {
"(\\d+)," + // Switch status
"(\\d+)" + // Relay status
"(?:[LH]{2})?" + // Power status
- "\\#V(\\d+).*"); // Battery
+ "#V(\\d+).*"); // Battery
@Override
protected Object decode(
diff --git a/src/org/traccar/protocol/IntellitracProtocolDecoder.java b/src/org/traccar/protocol/IntellitracProtocolDecoder.java
index b34753f1d..25d0914d7 100644
--- a/src/org/traccar/protocol/IntellitracProtocolDecoder.java
+++ b/src/org/traccar/protocol/IntellitracProtocolDecoder.java
@@ -22,7 +22,6 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.model.Event;
diff --git a/src/org/traccar/protocol/Jt600ProtocolDecoder.java b/src/org/traccar/protocol/Jt600ProtocolDecoder.java
index 45eeb5c4d..d6eca3a53 100644
--- a/src/org/traccar/protocol/Jt600ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Jt600ProtocolDecoder.java
@@ -24,7 +24,6 @@ import java.util.regex.Pattern;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.helper.ChannelBufferTools;
diff --git a/src/org/traccar/protocol/KhdProtocolDecoder.java b/src/org/traccar/protocol/KhdProtocolDecoder.java
index f98f3e963..67afca20c 100644
--- a/src/org/traccar/protocol/KhdProtocolDecoder.java
+++ b/src/org/traccar/protocol/KhdProtocolDecoder.java
@@ -22,7 +22,6 @@ import java.util.TimeZone;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.helper.ChannelBufferTools;
diff --git a/src/org/traccar/protocol/LaipacProtocolDecoder.java b/src/org/traccar/protocol/LaipacProtocolDecoder.java
index 8d111b05c..1696041fc 100644
--- a/src/org/traccar/protocol/LaipacProtocolDecoder.java
+++ b/src/org/traccar/protocol/LaipacProtocolDecoder.java
@@ -22,7 +22,6 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.helper.Crc;
diff --git a/src/org/traccar/protocol/M2mProtocolDecoder.java b/src/org/traccar/protocol/M2mProtocolDecoder.java
index ac1d8b7dc..4f50c0411 100644
--- a/src/org/traccar/protocol/M2mProtocolDecoder.java
+++ b/src/org/traccar/protocol/M2mProtocolDecoder.java
@@ -21,7 +21,6 @@ import java.util.TimeZone;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.model.Event;
diff --git a/src/org/traccar/protocol/ManPowerProtocolDecoder.java b/src/org/traccar/protocol/ManPowerProtocolDecoder.java
index aef64d69e..73b902c48 100644
--- a/src/org/traccar/protocol/ManPowerProtocolDecoder.java
+++ b/src/org/traccar/protocol/ManPowerProtocolDecoder.java
@@ -22,7 +22,6 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.model.Event;
diff --git a/src/org/traccar/protocol/MaxonProtocolDecoder.java b/src/org/traccar/protocol/MaxonProtocolDecoder.java
index 1ab37dc7d..5d5edfb60 100644
--- a/src/org/traccar/protocol/MaxonProtocolDecoder.java
+++ b/src/org/traccar/protocol/MaxonProtocolDecoder.java
@@ -22,7 +22,6 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.model.Position;
diff --git a/src/org/traccar/protocol/MeitrackProtocolDecoder.java b/src/org/traccar/protocol/MeitrackProtocolDecoder.java
index 2cdf75106..ba7841a8b 100644
--- a/src/org/traccar/protocol/MeitrackProtocolDecoder.java
+++ b/src/org/traccar/protocol/MeitrackProtocolDecoder.java
@@ -27,7 +27,6 @@ import java.util.regex.Pattern;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.helper.ChannelBufferTools;
diff --git a/src/org/traccar/protocol/MiniFinderProtocolDecoder.java b/src/org/traccar/protocol/MiniFinderProtocolDecoder.java
index cd9da419a..ae7731025 100644
--- a/src/org/traccar/protocol/MiniFinderProtocolDecoder.java
+++ b/src/org/traccar/protocol/MiniFinderProtocolDecoder.java
@@ -22,7 +22,6 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.model.Event;
@@ -35,7 +34,7 @@ public class MiniFinderProtocolDecoder extends BaseProtocolDecoder {
}
private static final Pattern pattern = Pattern.compile(
- "\\!D," +
+ "!D," +
"(\\d+)/(\\d+)/(\\d+)," + // Date
"(\\d+):(\\d+):(\\d+)," + // Time
"(-?\\d+\\.\\d+)," + // Latitude
diff --git a/src/org/traccar/protocol/Mta6ProtocolDecoder.java b/src/org/traccar/protocol/Mta6ProtocolDecoder.java
index e751c8b7a..2a900acbf 100644
--- a/src/org/traccar/protocol/Mta6ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Mta6ProtocolDecoder.java
@@ -25,7 +25,6 @@ import java.util.TimeZone;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.jboss.netty.handler.codec.http.DefaultHttpResponse;
import org.jboss.netty.handler.codec.http.HttpRequest;
import org.jboss.netty.handler.codec.http.HttpResponse;
diff --git a/src/org/traccar/protocol/MtxProtocolDecoder.java b/src/org/traccar/protocol/MtxProtocolDecoder.java
index 1203313f9..5fdb657e9 100644
--- a/src/org/traccar/protocol/MtxProtocolDecoder.java
+++ b/src/org/traccar/protocol/MtxProtocolDecoder.java
@@ -22,7 +22,6 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.model.Event;
diff --git a/src/org/traccar/protocol/MxtProtocolDecoder.java b/src/org/traccar/protocol/MxtProtocolDecoder.java
index 7f5ccabb2..a4e36acfb 100644
--- a/src/org/traccar/protocol/MxtProtocolDecoder.java
+++ b/src/org/traccar/protocol/MxtProtocolDecoder.java
@@ -21,7 +21,6 @@ import java.util.Date;
import java.util.TimeZone;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.helper.BitUtil;
import org.traccar.helper.UnitsConverter;
diff --git a/src/org/traccar/protocol/OrionProtocolDecoder.java b/src/org/traccar/protocol/OrionProtocolDecoder.java
index 388178dad..63cc23878 100644
--- a/src/org/traccar/protocol/OrionProtocolDecoder.java
+++ b/src/org/traccar/protocol/OrionProtocolDecoder.java
@@ -24,7 +24,6 @@ import java.util.TimeZone;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.model.Event;
diff --git a/src/org/traccar/protocol/PiligrimProtocolDecoder.java b/src/org/traccar/protocol/PiligrimProtocolDecoder.java
index fad9bc703..9e26594f2 100644
--- a/src/org/traccar/protocol/PiligrimProtocolDecoder.java
+++ b/src/org/traccar/protocol/PiligrimProtocolDecoder.java
@@ -26,7 +26,6 @@ import java.util.TimeZone;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.jboss.netty.handler.codec.http.DefaultHttpResponse;
import org.jboss.netty.handler.codec.http.HttpRequest;
import org.jboss.netty.handler.codec.http.HttpResponse;
diff --git a/src/org/traccar/protocol/ProgressProtocolDecoder.java b/src/org/traccar/protocol/ProgressProtocolDecoder.java
index 8613a760b..328facdea 100644
--- a/src/org/traccar/protocol/ProgressProtocolDecoder.java
+++ b/src/org/traccar/protocol/ProgressProtocolDecoder.java
@@ -26,7 +26,6 @@ import java.util.TimeZone;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.model.Event;
diff --git a/src/org/traccar/protocol/Pt3000ProtocolDecoder.java b/src/org/traccar/protocol/Pt3000ProtocolDecoder.java
index e226a8fb2..c6102e891 100644
--- a/src/org/traccar/protocol/Pt3000ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Pt3000ProtocolDecoder.java
@@ -22,7 +22,6 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.model.Position;
@@ -34,7 +33,7 @@ public class Pt3000ProtocolDecoder extends BaseProtocolDecoder {
}
static private Pattern pattern = Pattern.compile(
- "\\%(\\d+)," + // IMEI
+ "%(\\d+)," + // IMEI
"\\$GPRMC," +
"(\\d{2})(\\d{2})(\\d{2})\\.?\\d*," + // Time (HHMMSS.SSS)
"([AV])," + // Validity
diff --git a/src/org/traccar/protocol/RitiProtocolDecoder.java b/src/org/traccar/protocol/RitiProtocolDecoder.java
index 98003bbcf..d1736302d 100644
--- a/src/org/traccar/protocol/RitiProtocolDecoder.java
+++ b/src/org/traccar/protocol/RitiProtocolDecoder.java
@@ -24,7 +24,6 @@ import java.util.regex.Pattern;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.helper.ChannelBufferTools;
diff --git a/src/org/traccar/protocol/SanavProtocolDecoder.java b/src/org/traccar/protocol/SanavProtocolDecoder.java
index 729ed9793..630fcb16c 100644
--- a/src/org/traccar/protocol/SanavProtocolDecoder.java
+++ b/src/org/traccar/protocol/SanavProtocolDecoder.java
@@ -22,7 +22,6 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.model.Position;
diff --git a/src/org/traccar/protocol/Stl060ProtocolDecoder.java b/src/org/traccar/protocol/Stl060ProtocolDecoder.java
index c082ed479..df67c17d4 100644
--- a/src/org/traccar/protocol/Stl060ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Stl060ProtocolDecoder.java
@@ -21,7 +21,6 @@ import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.model.Event;
import org.traccar.model.Position;
diff --git a/src/org/traccar/protocol/TaipProtocolDecoder.java b/src/org/traccar/protocol/TaipProtocolDecoder.java
index b21eb5f5a..b87134e73 100644
--- a/src/org/traccar/protocol/TaipProtocolDecoder.java
+++ b/src/org/traccar/protocol/TaipProtocolDecoder.java
@@ -23,10 +23,8 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
-import org.traccar.Protocol;
import org.traccar.helper.UnitsConverter;
import org.traccar.model.Position;
diff --git a/src/org/traccar/protocol/TelikProtocolDecoder.java b/src/org/traccar/protocol/TelikProtocolDecoder.java
index 9a7a1652a..e70b4e569 100644
--- a/src/org/traccar/protocol/TelikProtocolDecoder.java
+++ b/src/org/traccar/protocol/TelikProtocolDecoder.java
@@ -22,7 +22,6 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.model.Event;
diff --git a/src/org/traccar/protocol/Tk102ProtocolDecoder.java b/src/org/traccar/protocol/Tk102ProtocolDecoder.java
index a278d65df..88d04a76f 100644
--- a/src/org/traccar/protocol/Tk102ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Tk102ProtocolDecoder.java
@@ -22,7 +22,6 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.model.Position;
diff --git a/src/org/traccar/protocol/Tlt2hProtocolDecoder.java b/src/org/traccar/protocol/Tlt2hProtocolDecoder.java
index 3cdb9199a..a81782deb 100644
--- a/src/org/traccar/protocol/Tlt2hProtocolDecoder.java
+++ b/src/org/traccar/protocol/Tlt2hProtocolDecoder.java
@@ -24,7 +24,6 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.model.Event;
diff --git a/src/org/traccar/protocol/TopflytechProtocolDecoder.java b/src/org/traccar/protocol/TopflytechProtocolDecoder.java
index 4a3eb533e..d2f028ad5 100644
--- a/src/org/traccar/protocol/TopflytechProtocolDecoder.java
+++ b/src/org/traccar/protocol/TopflytechProtocolDecoder.java
@@ -22,7 +22,6 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.model.Position;
diff --git a/src/org/traccar/protocol/Tr20ProtocolDecoder.java b/src/org/traccar/protocol/Tr20ProtocolDecoder.java
index 3a05fadd8..fd6ef2d61 100644
--- a/src/org/traccar/protocol/Tr20ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Tr20ProtocolDecoder.java
@@ -22,7 +22,6 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.helper.UnitsConverter;
@@ -35,10 +34,10 @@ public class Tr20ProtocolDecoder extends BaseProtocolDecoder {
}
static private Pattern patternPing = Pattern.compile(
- "\\%\\%[^,]+,(\\d+)");
+ "%%[^,]+,(\\d+)");
static private Pattern patternData = Pattern.compile(
- "\\%\\%" +
+ "%%" +
"([^,]+)," + // Id
"([AL])," + // Validity
"(\\d{2})(\\d{2})(\\d{2})" + // Date (YYMMDD)
diff --git a/src/org/traccar/protocol/TrackboxProtocolDecoder.java b/src/org/traccar/protocol/TrackboxProtocolDecoder.java
index 51743c2ba..a6c24599b 100644
--- a/src/org/traccar/protocol/TrackboxProtocolDecoder.java
+++ b/src/org/traccar/protocol/TrackboxProtocolDecoder.java
@@ -22,7 +22,6 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.model.Event;
diff --git a/src/org/traccar/protocol/TramigoFrameDecoder.java b/src/org/traccar/protocol/TramigoFrameDecoder.java
index f6dde4298..4055d2255 100644
--- a/src/org/traccar/protocol/TramigoFrameDecoder.java
+++ b/src/org/traccar/protocol/TramigoFrameDecoder.java
@@ -20,7 +20,6 @@ import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
import org.jboss.netty.channel.Channel;
import org.jboss.netty.channel.ChannelHandlerContext;
-import org.jboss.netty.handler.codec.frame.FrameDecoder;
import org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder;
public class TramigoFrameDecoder extends LengthFieldBasedFrameDecoder {
diff --git a/src/org/traccar/protocol/TramigoProtocolDecoder.java b/src/org/traccar/protocol/TramigoProtocolDecoder.java
index 3035c8f29..8a1e9046d 100644
--- a/src/org/traccar/protocol/TramigoProtocolDecoder.java
+++ b/src/org/traccar/protocol/TramigoProtocolDecoder.java
@@ -18,7 +18,6 @@ package org.traccar.protocol;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.helper.UnitsConverter;
import org.traccar.model.Event;
diff --git a/src/org/traccar/protocol/V680ProtocolDecoder.java b/src/org/traccar/protocol/V680ProtocolDecoder.java
index 6b8557a5a..5036817a5 100644
--- a/src/org/traccar/protocol/V680ProtocolDecoder.java
+++ b/src/org/traccar/protocol/V680ProtocolDecoder.java
@@ -22,7 +22,6 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.model.Event;
diff --git a/src/org/traccar/protocol/VisiontekProtocolDecoder.java b/src/org/traccar/protocol/VisiontekProtocolDecoder.java
index 49be11d6d..9a62f4e5c 100644
--- a/src/org/traccar/protocol/VisiontekProtocolDecoder.java
+++ b/src/org/traccar/protocol/VisiontekProtocolDecoder.java
@@ -21,7 +21,6 @@ import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.helper.UnitsConverter;
import org.traccar.model.Event;
diff --git a/src/org/traccar/protocol/WialonProtocolDecoder.java b/src/org/traccar/protocol/WialonProtocolDecoder.java
index e79a7e9ee..7d8382ad6 100644
--- a/src/org/traccar/protocol/WialonProtocolDecoder.java
+++ b/src/org/traccar/protocol/WialonProtocolDecoder.java
@@ -24,7 +24,6 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.helper.UnitsConverter;
diff --git a/src/org/traccar/protocol/WondexProtocolDecoder.java b/src/org/traccar/protocol/WondexProtocolDecoder.java
index 5771df043..4c35321cc 100644
--- a/src/org/traccar/protocol/WondexProtocolDecoder.java
+++ b/src/org/traccar/protocol/WondexProtocolDecoder.java
@@ -22,7 +22,6 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.helper.UnitsConverter;
diff --git a/src/org/traccar/protocol/XexunProtocolDecoder.java b/src/org/traccar/protocol/XexunProtocolDecoder.java
index 1bd155a56..348c30bde 100644
--- a/src/org/traccar/protocol/XexunProtocolDecoder.java
+++ b/src/org/traccar/protocol/XexunProtocolDecoder.java
@@ -22,7 +22,6 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.model.Event;
diff --git a/src/org/traccar/protocol/Xt013ProtocolDecoder.java b/src/org/traccar/protocol/Xt013ProtocolDecoder.java
index 11ae14d22..b2056ea14 100644
--- a/src/org/traccar/protocol/Xt013ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Xt013ProtocolDecoder.java
@@ -16,7 +16,6 @@
package org.traccar.protocol;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.helper.UnitsConverter;
import org.traccar.model.Event;
diff --git a/src/org/traccar/protocol/YwtProtocolDecoder.java b/src/org/traccar/protocol/YwtProtocolDecoder.java
index 67ea13817..7e3001f86 100644
--- a/src/org/traccar/protocol/YwtProtocolDecoder.java
+++ b/src/org/traccar/protocol/YwtProtocolDecoder.java
@@ -22,7 +22,6 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.model.Event;
diff --git a/src/org/traccar/web/JsonConverter.java b/src/org/traccar/web/JsonConverter.java
index a78821d1f..ad28a96fe 100644
--- a/src/org/traccar/web/JsonConverter.java
+++ b/src/org/traccar/web/JsonConverter.java
@@ -19,9 +19,7 @@ import java.beans.Introspector;
import java.io.Reader;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
-import java.text.DateFormat;
import java.text.ParseException;
-import java.text.SimpleDateFormat;
import java.util.Collection;
import java.util.Date;
import java.util.Map;
@@ -33,7 +31,6 @@ import javax.json.JsonObjectBuilder;
import javax.json.JsonReader;
import javax.json.JsonValue;
-import org.apache.log4j.helpers.ISO8601DateFormat;
import org.joda.time.DateTime;
import org.joda.time.format.DateTimeFormatter;
import org.joda.time.format.ISODateTimeFormat;
diff --git a/test/org/traccar/DetectorHandlerTest.java b/test/org/traccar/DetectorHandlerTest.java
index 93623dcec..4bac79d53 100644
--- a/test/org/traccar/DetectorHandlerTest.java
+++ b/test/org/traccar/DetectorHandlerTest.java
@@ -1,26 +1,6 @@
package org.traccar;
-import org.jboss.netty.buffer.ChannelBuffer;
-import org.jboss.netty.buffer.ChannelBuffers;
-import org.jboss.netty.channel.ChannelPipeline;
-import org.jboss.netty.channel.Channels;
-import org.jboss.netty.handler.codec.string.StringDecoder;
-import org.jboss.netty.handler.codec.string.StringEncoder;
-import org.jboss.netty.handler.timeout.IdleStateHandler;
-import org.junit.After;
-import org.junit.Before;
import org.junit.Test;
-import org.traccar.helper.TestIdentityManager;
-import org.traccar.model.Event;
-import org.traccar.model.Position;
-import org.traccar.protocol.Gps103ProtocolDecoder;
-
-import java.nio.charset.Charset;
-import java.util.Date;
-import java.util.List;
-
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
public class DetectorHandlerTest {
diff --git a/test/org/traccar/geocode/ReverseGeocoderTest.java b/test/org/traccar/geocode/ReverseGeocoderTest.java
index cae515e27..31cff8f71 100644
--- a/test/org/traccar/geocode/ReverseGeocoderTest.java
+++ b/test/org/traccar/geocode/ReverseGeocoderTest.java
@@ -1,8 +1,5 @@
package org.traccar.geocode;
-import static org.junit.Assert.assertEquals;
-import org.junit.Test;
-
public class ReverseGeocoderTest {
/*@Test
diff --git a/test/org/traccar/helper/DecoderVerifier.java b/test/org/traccar/helper/DecoderVerifier.java
index 4b6272185..4761ba03a 100644
--- a/test/org/traccar/helper/DecoderVerifier.java
+++ b/test/org/traccar/helper/DecoderVerifier.java
@@ -3,7 +3,6 @@ package org.traccar.helper;
import java.util.Date;
import java.util.List;
import static org.junit.Assert.*;
-import org.traccar.model.Event;
import org.traccar.model.Position;
public class DecoderVerifier {
diff --git a/test/org/traccar/protocol/ApelProtocolDecoderTest.java b/test/org/traccar/protocol/ApelProtocolDecoderTest.java
index 7ac16d25b..00f77511e 100644
--- a/test/org/traccar/protocol/ApelProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/ApelProtocolDecoderTest.java
@@ -1,10 +1,5 @@
package org.traccar.protocol;
-import org.traccar.helper.TestIdentityManager;
-import java.nio.ByteOrder;
-import org.jboss.netty.buffer.ChannelBuffers;
-import static org.traccar.helper.DecoderVerifier.verify;
-import static org.junit.Assert.assertNull;
import org.junit.Test;
public class ApelProtocolDecoderTest extends ProtocolDecoderTest {
diff --git a/test/org/traccar/protocol/Ardi01ProtocolDecoderTest.java b/test/org/traccar/protocol/Ardi01ProtocolDecoderTest.java
index 9e61ee52a..daaec0ae5 100644
--- a/test/org/traccar/protocol/Ardi01ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/Ardi01ProtocolDecoderTest.java
@@ -1,9 +1,7 @@
package org.traccar.protocol;
import org.junit.Test;
-import org.traccar.helper.TestIdentityManager;
-import static org.junit.Assert.assertNull;
import static org.traccar.helper.DecoderVerifier.verify;
public class Ardi01ProtocolDecoderTest extends ProtocolDecoderTest {
diff --git a/test/org/traccar/protocol/AutoFon45ProtocolDecoderTest.java b/test/org/traccar/protocol/AutoFon45ProtocolDecoderTest.java
index d9d65727d..b90fda918 100644
--- a/test/org/traccar/protocol/AutoFon45ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/AutoFon45ProtocolDecoderTest.java
@@ -3,7 +3,6 @@ package org.traccar.protocol;
import org.jboss.netty.buffer.ChannelBuffers;
import org.junit.Test;
import org.traccar.helper.ChannelBufferTools;
-import org.traccar.helper.TestIdentityManager;
import static org.junit.Assert.assertNull;
import static org.traccar.helper.DecoderVerifier.verify;
diff --git a/test/org/traccar/protocol/AutoFonProtocolDecoderTest.java b/test/org/traccar/protocol/AutoFonProtocolDecoderTest.java
index ea2fe481e..f0a1611bf 100644
--- a/test/org/traccar/protocol/AutoFonProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/AutoFonProtocolDecoderTest.java
@@ -3,7 +3,6 @@ package org.traccar.protocol;
import org.jboss.netty.buffer.ChannelBuffers;
import org.junit.Test;
import org.traccar.helper.ChannelBufferTools;
-import org.traccar.helper.TestIdentityManager;
import static org.junit.Assert.assertNull;
import static org.traccar.helper.DecoderVerifier.verify;
diff --git a/test/org/traccar/protocol/BceProtocolDecoderTest.java b/test/org/traccar/protocol/BceProtocolDecoderTest.java
index 06dbfb96e..811a912b8 100644
--- a/test/org/traccar/protocol/BceProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/BceProtocolDecoderTest.java
@@ -2,12 +2,10 @@ package org.traccar.protocol;
import java.nio.ByteOrder;
-import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
import org.junit.Test;
import org.traccar.helper.ChannelBufferTools;
import static org.traccar.helper.DecoderVerifier.verify;
-import org.traccar.helper.TestIdentityManager;
public class BceProtocolDecoderTest extends ProtocolDecoderTest {
diff --git a/test/org/traccar/protocol/BoxProtocolDecoderTest.java b/test/org/traccar/protocol/BoxProtocolDecoderTest.java
index e83b2090a..9aacc85f0 100644
--- a/test/org/traccar/protocol/BoxProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/BoxProtocolDecoderTest.java
@@ -1,7 +1,6 @@
package org.traccar.protocol;
import static org.junit.Assert.assertNull;
-import org.traccar.helper.TestIdentityManager;
import static org.traccar.helper.DecoderVerifier.verify;
import org.junit.Test;
diff --git a/test/org/traccar/protocol/CarTrackProtocolDecoderTest.java b/test/org/traccar/protocol/CarTrackProtocolDecoderTest.java
index fb97fefbc..1180ac6f2 100644
--- a/test/org/traccar/protocol/CarTrackProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/CarTrackProtocolDecoderTest.java
@@ -1,6 +1,5 @@
package org.traccar.protocol;
-import org.traccar.helper.TestIdentityManager;
import static org.traccar.helper.DecoderVerifier.verify;
import org.junit.Test;
diff --git a/test/org/traccar/protocol/CarscopProtocolDecoderTest.java b/test/org/traccar/protocol/CarscopProtocolDecoderTest.java
index 2e9cb60b9..452797e1b 100644
--- a/test/org/traccar/protocol/CarscopProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/CarscopProtocolDecoderTest.java
@@ -1,8 +1,7 @@
package org.traccar.protocol;
-import org.traccar.helper.TestIdentityManager;
import static org.traccar.helper.DecoderVerifier.verify;
-import static org.junit.Assert.assertNull;
+
import org.junit.Test;
public class CarscopProtocolDecoderTest extends ProtocolDecoderTest {
diff --git a/test/org/traccar/protocol/CellocatorProtocolDecoderTest.java b/test/org/traccar/protocol/CellocatorProtocolDecoderTest.java
index b4b2ac443..d744a55ee 100644
--- a/test/org/traccar/protocol/CellocatorProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/CellocatorProtocolDecoderTest.java
@@ -1,6 +1,5 @@
package org.traccar.protocol;
-import org.traccar.helper.TestIdentityManager;
import java.nio.ByteOrder;
import org.jboss.netty.buffer.ChannelBuffers;
import static org.traccar.helper.DecoderVerifier.verify;
diff --git a/test/org/traccar/protocol/EasyTrackProtocolDecoderTest.java b/test/org/traccar/protocol/EasyTrackProtocolDecoderTest.java
index 9798f3672..37dcdec59 100644
--- a/test/org/traccar/protocol/EasyTrackProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/EasyTrackProtocolDecoderTest.java
@@ -1,6 +1,5 @@
package org.traccar.protocol;
-import org.traccar.helper.TestIdentityManager;
import static org.traccar.helper.DecoderVerifier.verify;
import static org.junit.Assert.assertNull;
import org.junit.Test;
diff --git a/test/org/traccar/protocol/EnforaProtocolDecoderTest.java b/test/org/traccar/protocol/EnforaProtocolDecoderTest.java
index 97945087e..2dd649cbd 100644
--- a/test/org/traccar/protocol/EnforaProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/EnforaProtocolDecoderTest.java
@@ -1,9 +1,7 @@
package org.traccar.protocol;
-import org.traccar.helper.TestIdentityManager;
-import org.jboss.netty.buffer.ChannelBufferFactory;
import org.jboss.netty.buffer.ChannelBuffers;
-import org.jboss.netty.buffer.HeapChannelBufferFactory;
+
import static org.junit.Assert.assertNull;
import org.junit.Test;
import org.traccar.helper.ChannelBufferTools;
diff --git a/test/org/traccar/protocol/Ev603ProtocolDecoderTest.java b/test/org/traccar/protocol/Ev603ProtocolDecoderTest.java
index e116fff39..8a2b6c1f5 100644
--- a/test/org/traccar/protocol/Ev603ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/Ev603ProtocolDecoderTest.java
@@ -1,6 +1,5 @@
package org.traccar.protocol;
-import org.traccar.helper.TestIdentityManager;
import static org.traccar.helper.DecoderVerifier.verify;
import static org.junit.Assert.assertNull;
import org.junit.Test;
diff --git a/test/org/traccar/protocol/FreedomProtocolDecoderTest.java b/test/org/traccar/protocol/FreedomProtocolDecoderTest.java
index 9bedb9d4f..d8975e861 100644
--- a/test/org/traccar/protocol/FreedomProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/FreedomProtocolDecoderTest.java
@@ -1,8 +1,7 @@
package org.traccar.protocol;
-import org.traccar.helper.TestIdentityManager;
import static org.traccar.helper.DecoderVerifier.verify;
-import static org.junit.Assert.assertNull;
+
import org.junit.Test;
public class FreedomProtocolDecoderTest extends ProtocolDecoderTest {
diff --git a/test/org/traccar/protocol/GalileoProtocolDecoderTest.java b/test/org/traccar/protocol/GalileoProtocolDecoderTest.java
index 8539c0935..18fc48d3e 100644
--- a/test/org/traccar/protocol/GalileoProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/GalileoProtocolDecoderTest.java
@@ -1,6 +1,5 @@
package org.traccar.protocol;
-import org.traccar.helper.TestIdentityManager;
import java.nio.ByteOrder;
import org.jboss.netty.buffer.ChannelBuffers;
import static org.junit.Assert.assertNull;
diff --git a/test/org/traccar/protocol/GatorProtocolDecoderTest.java b/test/org/traccar/protocol/GatorProtocolDecoderTest.java
index c8ce98465..cecf70527 100644
--- a/test/org/traccar/protocol/GatorProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/GatorProtocolDecoderTest.java
@@ -1,6 +1,5 @@
package org.traccar.protocol;
-import org.traccar.helper.TestIdentityManager;
import org.jboss.netty.buffer.ChannelBuffers;
import static org.traccar.helper.DecoderVerifier.verify;
import org.junit.Test;
diff --git a/test/org/traccar/protocol/Gl100ProtocolDecoderTest.java b/test/org/traccar/protocol/Gl100ProtocolDecoderTest.java
index 7af70ef1d..0755fea5a 100644
--- a/test/org/traccar/protocol/Gl100ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/Gl100ProtocolDecoderTest.java
@@ -1,7 +1,6 @@
package org.traccar.protocol;
import static org.junit.Assert.assertNull;
-import org.traccar.helper.TestIdentityManager;
import static org.traccar.helper.DecoderVerifier.verify;
import org.junit.Test;
diff --git a/test/org/traccar/protocol/GotopProtocolDecoderTest.java b/test/org/traccar/protocol/GotopProtocolDecoderTest.java
index 1fd055d69..260114bc7 100644
--- a/test/org/traccar/protocol/GotopProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/GotopProtocolDecoderTest.java
@@ -1,6 +1,5 @@
package org.traccar.protocol;
-import org.traccar.helper.TestIdentityManager;
import static org.traccar.helper.DecoderVerifier.verify;
import static org.junit.Assert.assertNull;
import org.junit.Test;
diff --git a/test/org/traccar/protocol/GpsGateProtocolDecoderTest.java b/test/org/traccar/protocol/GpsGateProtocolDecoderTest.java
index 7c7635f42..0913ae2f8 100644
--- a/test/org/traccar/protocol/GpsGateProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/GpsGateProtocolDecoderTest.java
@@ -1,6 +1,5 @@
package org.traccar.protocol;
-import org.traccar.helper.TestIdentityManager;
import static org.traccar.helper.DecoderVerifier.verify;
import static org.junit.Assert.assertNull;
import org.junit.Test;
diff --git a/test/org/traccar/protocol/GpsmtaProtocolDecoderTest.java b/test/org/traccar/protocol/GpsmtaProtocolDecoderTest.java
index a5ac56a6e..f6c51bf6e 100644
--- a/test/org/traccar/protocol/GpsmtaProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/GpsmtaProtocolDecoderTest.java
@@ -2,7 +2,6 @@ package org.traccar.protocol;
import org.junit.Test;
-import static org.junit.Assert.assertNull;
import static org.traccar.helper.DecoderVerifier.verify;
public class GpsmtaProtocolDecoderTest extends ProtocolDecoderTest {
diff --git a/test/org/traccar/protocol/Gt02ProtocolDecoderTest.java b/test/org/traccar/protocol/Gt02ProtocolDecoderTest.java
index d9533eae1..17c557c69 100644
--- a/test/org/traccar/protocol/Gt02ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/Gt02ProtocolDecoderTest.java
@@ -5,7 +5,6 @@ import static org.junit.Assert.assertNull;
import org.junit.Test;
import org.traccar.helper.ChannelBufferTools;
import static org.traccar.helper.DecoderVerifier.verify;
-import org.traccar.helper.TestIdentityManager;
public class Gt02ProtocolDecoderTest extends ProtocolDecoderTest {
diff --git a/test/org/traccar/protocol/H02ProtocolDecoderTest.java b/test/org/traccar/protocol/H02ProtocolDecoderTest.java
index 5be78d643..744a9982d 100644
--- a/test/org/traccar/protocol/H02ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/H02ProtocolDecoderTest.java
@@ -1,6 +1,5 @@
package org.traccar.protocol;
-import org.traccar.helper.TestIdentityManager;
import java.nio.charset.Charset;
import org.jboss.netty.buffer.ChannelBuffers;
import static org.traccar.helper.DecoderVerifier.verify;
diff --git a/test/org/traccar/protocol/HaicomProtocolDecoderTest.java b/test/org/traccar/protocol/HaicomProtocolDecoderTest.java
index 3e0d3de13..03257b6bd 100644
--- a/test/org/traccar/protocol/HaicomProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/HaicomProtocolDecoderTest.java
@@ -1,6 +1,5 @@
package org.traccar.protocol;
-import org.traccar.helper.TestIdentityManager;
import static org.traccar.helper.DecoderVerifier.verify;
import org.junit.Test;
diff --git a/test/org/traccar/protocol/Jt600ProtocolDecoderTest.java b/test/org/traccar/protocol/Jt600ProtocolDecoderTest.java
index 69f68badb..24ba109d9 100644
--- a/test/org/traccar/protocol/Jt600ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/Jt600ProtocolDecoderTest.java
@@ -1,7 +1,7 @@
package org.traccar.protocol;
import org.traccar.helper.ChannelBufferTools;
-import org.traccar.helper.TestIdentityManager;
+
import java.nio.charset.Charset;
import org.jboss.netty.buffer.ChannelBuffers;
import static org.traccar.helper.DecoderVerifier.verify;
diff --git a/test/org/traccar/protocol/KhdProtocolDecoderTest.java b/test/org/traccar/protocol/KhdProtocolDecoderTest.java
index 7bab7b2e8..7f9eb4a7a 100644
--- a/test/org/traccar/protocol/KhdProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/KhdProtocolDecoderTest.java
@@ -1,6 +1,5 @@
package org.traccar.protocol;
-import org.traccar.helper.TestIdentityManager;
import org.jboss.netty.buffer.ChannelBuffers;
import static org.traccar.helper.DecoderVerifier.verify;
import static org.junit.Assert.assertNull;
diff --git a/test/org/traccar/protocol/LaipacProtocolDecoderTest.java b/test/org/traccar/protocol/LaipacProtocolDecoderTest.java
index 91f5be16b..62ca2fc1c 100644
--- a/test/org/traccar/protocol/LaipacProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/LaipacProtocolDecoderTest.java
@@ -1,6 +1,5 @@
package org.traccar.protocol;
-import org.traccar.helper.TestIdentityManager;
import static org.traccar.helper.DecoderVerifier.verify;
import static org.junit.Assert.assertNull;
import org.junit.Test;
diff --git a/test/org/traccar/protocol/M2mProtocolDecoderTest.java b/test/org/traccar/protocol/M2mProtocolDecoderTest.java
index 2add802c2..fe6398f32 100644
--- a/test/org/traccar/protocol/M2mProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/M2mProtocolDecoderTest.java
@@ -1,6 +1,5 @@
package org.traccar.protocol;
-import org.traccar.helper.TestIdentityManager;
import org.jboss.netty.buffer.ChannelBuffers;
import static org.traccar.helper.DecoderVerifier.verify;
import static org.junit.Assert.assertNull;
diff --git a/test/org/traccar/protocol/ManPowerProtocolDecoderTest.java b/test/org/traccar/protocol/ManPowerProtocolDecoderTest.java
index 1e58f490a..2101e7709 100644
--- a/test/org/traccar/protocol/ManPowerProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/ManPowerProtocolDecoderTest.java
@@ -1,6 +1,5 @@
package org.traccar.protocol;
-import org.traccar.helper.TestIdentityManager;
import static org.traccar.helper.DecoderVerifier.verify;
import org.junit.Test;
diff --git a/test/org/traccar/protocol/MiniFinderProtocolDecoderTest.java b/test/org/traccar/protocol/MiniFinderProtocolDecoderTest.java
index f58775470..742376fe7 100644
--- a/test/org/traccar/protocol/MiniFinderProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/MiniFinderProtocolDecoderTest.java
@@ -1,6 +1,5 @@
package org.traccar.protocol;
-import org.traccar.helper.TestIdentityManager;
import static org.traccar.helper.DecoderVerifier.verify;
import static org.junit.Assert.assertNull;
import org.junit.Test;
diff --git a/test/org/traccar/protocol/MtxProtocolDecoderTest.java b/test/org/traccar/protocol/MtxProtocolDecoderTest.java
index 1724cf5ee..bc597af4d 100644
--- a/test/org/traccar/protocol/MtxProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/MtxProtocolDecoderTest.java
@@ -1,8 +1,7 @@
package org.traccar.protocol;
-import org.traccar.helper.TestIdentityManager;
import static org.traccar.helper.DecoderVerifier.verify;
-import static org.junit.Assert.assertNull;
+
import org.junit.Test;
public class MtxProtocolDecoderTest extends ProtocolDecoderTest {
diff --git a/test/org/traccar/protocol/NavigilProtocolDecoderTest.java b/test/org/traccar/protocol/NavigilProtocolDecoderTest.java
index 10560ee65..3ad29e474 100644
--- a/test/org/traccar/protocol/NavigilProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/NavigilProtocolDecoderTest.java
@@ -1,6 +1,5 @@
package org.traccar.protocol;
-import org.traccar.helper.TestIdentityManager;
import java.nio.ByteOrder;
import org.jboss.netty.buffer.ChannelBuffers;
import static org.junit.Assert.assertNull;
diff --git a/test/org/traccar/protocol/NavisProtocolDecoderTest.java b/test/org/traccar/protocol/NavisProtocolDecoderTest.java
index 09ea0b520..863deb3d9 100644
--- a/test/org/traccar/protocol/NavisProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/NavisProtocolDecoderTest.java
@@ -1,7 +1,7 @@
package org.traccar.protocol;
import org.traccar.helper.ChannelBufferTools;
-import org.traccar.helper.TestIdentityManager;
+
import java.nio.ByteOrder;
import org.jboss.netty.buffer.ChannelBuffers;
import static org.traccar.helper.DecoderVerifier.verify;
diff --git a/test/org/traccar/protocol/OrionProtocolDecoderTest.java b/test/org/traccar/protocol/OrionProtocolDecoderTest.java
index 9de08e56c..2a8d24199 100644
--- a/test/org/traccar/protocol/OrionProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/OrionProtocolDecoderTest.java
@@ -1,9 +1,7 @@
package org.traccar.protocol;
-import org.traccar.helper.TestIdentityManager;
import java.nio.ByteOrder;
import org.jboss.netty.buffer.ChannelBuffers;
-import static org.junit.Assert.assertNull;
import org.junit.Test;
import org.traccar.helper.ChannelBufferTools;
import static org.traccar.helper.DecoderVerifier.verify;
diff --git a/test/org/traccar/protocol/PiligrimProtocolDecoderTest.java b/test/org/traccar/protocol/PiligrimProtocolDecoderTest.java
index 9fd44d65b..eef6cc65e 100644
--- a/test/org/traccar/protocol/PiligrimProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/PiligrimProtocolDecoderTest.java
@@ -1,12 +1,11 @@
package org.traccar.protocol;
import org.jboss.netty.buffer.ChannelBuffers;
-import org.traccar.helper.TestIdentityManager;
import org.jboss.netty.handler.codec.http.DefaultHttpRequest;
import org.jboss.netty.handler.codec.http.HttpMethod;
import org.jboss.netty.handler.codec.http.HttpRequest;
import org.jboss.netty.handler.codec.http.HttpVersion;
-import static org.junit.Assert.assertNull;
+
import static org.traccar.helper.DecoderVerifier.verify;
import org.junit.Test;
import org.traccar.helper.ChannelBufferTools;
diff --git a/test/org/traccar/protocol/ProgressProtocolDecoderTest.java b/test/org/traccar/protocol/ProgressProtocolDecoderTest.java
index c5645a711..70e9acae4 100644
--- a/test/org/traccar/protocol/ProgressProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/ProgressProtocolDecoderTest.java
@@ -3,12 +3,10 @@ package org.traccar.protocol;
import org.jboss.netty.buffer.ChannelBuffers;
import org.junit.Test;
import org.traccar.helper.ChannelBufferTools;
-import org.traccar.helper.TestIdentityManager;
import java.nio.ByteOrder;
import static org.junit.Assert.assertNull;
-import static org.traccar.helper.DecoderVerifier.verify;
public class ProgressProtocolDecoderTest extends ProtocolDecoderTest {
diff --git a/test/org/traccar/protocol/Pt3000ProtocolDecoderTest.java b/test/org/traccar/protocol/Pt3000ProtocolDecoderTest.java
index dc4eed6dd..a5c85a51b 100644
--- a/test/org/traccar/protocol/Pt3000ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/Pt3000ProtocolDecoderTest.java
@@ -1,6 +1,5 @@
package org.traccar.protocol;
-import org.traccar.helper.TestIdentityManager;
import static org.traccar.helper.DecoderVerifier.verify;
import org.junit.Test;
diff --git a/test/org/traccar/protocol/RitiProtocolDecoderTest.java b/test/org/traccar/protocol/RitiProtocolDecoderTest.java
index 80c7c7f19..1afbbea70 100644
--- a/test/org/traccar/protocol/RitiProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/RitiProtocolDecoderTest.java
@@ -2,11 +2,9 @@ package org.traccar.protocol;
import java.nio.ByteOrder;
import org.jboss.netty.buffer.ChannelBuffers;
-import static org.junit.Assert.assertNull;
import org.junit.Test;
import org.traccar.helper.ChannelBufferTools;
import static org.traccar.helper.DecoderVerifier.verify;
-import org.traccar.helper.TestIdentityManager;
public class RitiProtocolDecoderTest extends ProtocolDecoderTest {
diff --git a/test/org/traccar/protocol/SanavProtocolDecoderTest.java b/test/org/traccar/protocol/SanavProtocolDecoderTest.java
index a2d1cc648..0f881c82a 100644
--- a/test/org/traccar/protocol/SanavProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/SanavProtocolDecoderTest.java
@@ -1,6 +1,5 @@
package org.traccar.protocol;
-import org.traccar.helper.TestIdentityManager;
import static org.traccar.helper.DecoderVerifier.verify;
import org.junit.Test;
diff --git a/test/org/traccar/protocol/SkypatrolProtocolDecoderTest.java b/test/org/traccar/protocol/SkypatrolProtocolDecoderTest.java
index 8d2971250..e730358fe 100644
--- a/test/org/traccar/protocol/SkypatrolProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/SkypatrolProtocolDecoderTest.java
@@ -1,6 +1,5 @@
package org.traccar.protocol;
-import org.traccar.helper.TestIdentityManager;
import org.jboss.netty.buffer.ChannelBuffers;
import static org.traccar.helper.DecoderVerifier.verify;
import org.junit.Test;
diff --git a/test/org/traccar/protocol/TelikProtocolDecoderTest.java b/test/org/traccar/protocol/TelikProtocolDecoderTest.java
index ee826cddd..c8c21c694 100644
--- a/test/org/traccar/protocol/TelikProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/TelikProtocolDecoderTest.java
@@ -1,6 +1,5 @@
package org.traccar.protocol;
-import org.traccar.helper.TestIdentityManager;
import static org.traccar.helper.DecoderVerifier.verify;
import static org.junit.Assert.assertNull;
import org.junit.Test;
diff --git a/test/org/traccar/protocol/TeltonikaProtocolDecoderTest.java b/test/org/traccar/protocol/TeltonikaProtocolDecoderTest.java
index a2fe4f461..96efda58c 100644
--- a/test/org/traccar/protocol/TeltonikaProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/TeltonikaProtocolDecoderTest.java
@@ -1,6 +1,5 @@
package org.traccar.protocol;
-import org.traccar.helper.TestIdentityManager;
import org.jboss.netty.buffer.ChannelBuffers;
import static org.traccar.helper.DecoderVerifier.verify;
import static org.junit.Assert.assertNull;
diff --git a/test/org/traccar/protocol/Tk102ProtocolDecoderTest.java b/test/org/traccar/protocol/Tk102ProtocolDecoderTest.java
index eff9edfe0..d25b33439 100644
--- a/test/org/traccar/protocol/Tk102ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/Tk102ProtocolDecoderTest.java
@@ -1,6 +1,5 @@
package org.traccar.protocol;
-import org.traccar.helper.TestIdentityManager;
import static org.traccar.helper.DecoderVerifier.verify;
import static org.junit.Assert.assertNull;
import org.junit.Test;
diff --git a/test/org/traccar/protocol/Tlt2hProtocolDecoderTest.java b/test/org/traccar/protocol/Tlt2hProtocolDecoderTest.java
index 3e1c82c0b..8de9f9ac8 100644
--- a/test/org/traccar/protocol/Tlt2hProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/Tlt2hProtocolDecoderTest.java
@@ -1,6 +1,5 @@
package org.traccar.protocol;
-import org.traccar.helper.TestIdentityManager;
import static org.traccar.helper.DecoderVerifier.verify;
import org.junit.Test;
diff --git a/test/org/traccar/protocol/TopflytechProtocolDecoderTest.java b/test/org/traccar/protocol/TopflytechProtocolDecoderTest.java
index cfabebb9c..f1d44735f 100644
--- a/test/org/traccar/protocol/TopflytechProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/TopflytechProtocolDecoderTest.java
@@ -1,8 +1,7 @@
package org.traccar.protocol;
-import org.traccar.helper.TestIdentityManager;
import static org.traccar.helper.DecoderVerifier.verify;
-import static org.junit.Assert.assertNull;
+
import org.junit.Test;
public class TopflytechProtocolDecoderTest extends ProtocolDecoderTest {
diff --git a/test/org/traccar/protocol/TotemProtocolDecoderTest.java b/test/org/traccar/protocol/TotemProtocolDecoderTest.java
index c01640241..fd08798e0 100644
--- a/test/org/traccar/protocol/TotemProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/TotemProtocolDecoderTest.java
@@ -1,6 +1,5 @@
package org.traccar.protocol;
-import org.traccar.helper.TestIdentityManager;
import static org.traccar.helper.DecoderVerifier.verify;
import static org.junit.Assert.assertNull;
import org.junit.Test;
diff --git a/test/org/traccar/protocol/Tr20ProtocolDecoderTest.java b/test/org/traccar/protocol/Tr20ProtocolDecoderTest.java
index c1e0b612f..2156e3385 100644
--- a/test/org/traccar/protocol/Tr20ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/Tr20ProtocolDecoderTest.java
@@ -1,6 +1,5 @@
package org.traccar.protocol;
-import org.traccar.helper.TestIdentityManager;
import static org.traccar.helper.DecoderVerifier.verify;
import static org.junit.Assert.assertNull;
import org.junit.Test;
diff --git a/test/org/traccar/protocol/TrackboxProtocolDecoderTest.java b/test/org/traccar/protocol/TrackboxProtocolDecoderTest.java
index 1939a50c1..4e6430ff2 100644
--- a/test/org/traccar/protocol/TrackboxProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/TrackboxProtocolDecoderTest.java
@@ -1,6 +1,5 @@
package org.traccar.protocol;
-import org.traccar.helper.TestIdentityManager;
import static org.traccar.helper.DecoderVerifier.verify;
import static org.junit.Assert.assertNull;
import org.junit.Test;
diff --git a/test/org/traccar/protocol/TytanProtocolDecoderTest.java b/test/org/traccar/protocol/TytanProtocolDecoderTest.java
index 3e846cbe6..fb389a2cd 100644
--- a/test/org/traccar/protocol/TytanProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/TytanProtocolDecoderTest.java
@@ -1,9 +1,6 @@
package org.traccar.protocol;
-import org.jboss.netty.buffer.ChannelBuffers;
import org.junit.Test;
-import org.traccar.helper.ChannelBufferTools;
-import static org.traccar.helper.DecoderVerifier.verify;
public class TytanProtocolDecoderTest extends ProtocolDecoderTest {
diff --git a/test/org/traccar/protocol/UlbotechProtocolDecoderTest.java b/test/org/traccar/protocol/UlbotechProtocolDecoderTest.java
index b074d69a3..239898b33 100644
--- a/test/org/traccar/protocol/UlbotechProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/UlbotechProtocolDecoderTest.java
@@ -3,7 +3,6 @@ package org.traccar.protocol;
import org.jboss.netty.buffer.ChannelBuffers;
import org.junit.Test;
import org.traccar.helper.ChannelBufferTools;
-import org.traccar.helper.TestIdentityManager;
import static org.junit.Assert.assertNull;
import static org.traccar.helper.DecoderVerifier.verify;
diff --git a/test/org/traccar/protocol/V680ProtocolDecoderTest.java b/test/org/traccar/protocol/V680ProtocolDecoderTest.java
index 29dd1b3bd..981126ed8 100644
--- a/test/org/traccar/protocol/V680ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/V680ProtocolDecoderTest.java
@@ -1,6 +1,5 @@
package org.traccar.protocol;
-import org.traccar.helper.TestIdentityManager;
import static org.traccar.helper.DecoderVerifier.verify;
import static org.junit.Assert.assertNull;
import org.junit.Test;
diff --git a/test/org/traccar/protocol/WialonProtocolDecoderTest.java b/test/org/traccar/protocol/WialonProtocolDecoderTest.java
index 52f616334..dbf2c0eac 100644
--- a/test/org/traccar/protocol/WialonProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/WialonProtocolDecoderTest.java
@@ -1,6 +1,5 @@
package org.traccar.protocol;
-import org.traccar.helper.TestIdentityManager;
import static org.traccar.helper.DecoderVerifier.verify;
import static org.junit.Assert.assertNull;
import org.junit.Test;
diff --git a/test/org/traccar/protocol/WondexProtocolDecoderTest.java b/test/org/traccar/protocol/WondexProtocolDecoderTest.java
index 8825c957f..2aec5d450 100644
--- a/test/org/traccar/protocol/WondexProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/WondexProtocolDecoderTest.java
@@ -1,6 +1,5 @@
package org.traccar.protocol;
-import org.traccar.helper.TestIdentityManager;
import static org.traccar.helper.DecoderVerifier.verify;
import org.junit.Test;
diff --git a/test/org/traccar/protocol/Xt013ProtocolDecoderTest.java b/test/org/traccar/protocol/Xt013ProtocolDecoderTest.java
index fbf5a6517..2f0e95596 100644
--- a/test/org/traccar/protocol/Xt013ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/Xt013ProtocolDecoderTest.java
@@ -1,7 +1,6 @@
package org.traccar.protocol;
import org.junit.Test;
-import org.traccar.helper.TestIdentityManager;
import static org.traccar.helper.DecoderVerifier.verify;
diff --git a/test/org/traccar/protocol/YwtProtocolDecoderTest.java b/test/org/traccar/protocol/YwtProtocolDecoderTest.java
index 29a4d67ef..7743d90b4 100644
--- a/test/org/traccar/protocol/YwtProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/YwtProtocolDecoderTest.java
@@ -1,6 +1,5 @@
package org.traccar.protocol;
-import org.traccar.helper.TestIdentityManager;
import static org.traccar.helper.DecoderVerifier.verify;
import static org.junit.Assert.assertNull;
import org.junit.Test;
diff --git a/test/org/traccar/web/JsonConverterTest.java b/test/org/traccar/web/JsonConverterTest.java
index 2e869ae01..5b2d80ebc 100644
--- a/test/org/traccar/web/JsonConverterTest.java
+++ b/test/org/traccar/web/JsonConverterTest.java
@@ -2,7 +2,6 @@ package org.traccar.web;
import java.io.StringReader;
import java.text.ParseException;
-import java.util.Calendar;
import java.util.Date;
import static org.junit.Assert.assertEquals;
import org.junit.Test;