aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol')
-rw-r--r--src/org/traccar/protocol/CarscopProtocolDecoder.java2
-rw-r--r--src/org/traccar/protocol/EasyTrackProtocolDecoder.java2
-rw-r--r--src/org/traccar/protocol/Jt600ProtocolDecoder.java4
-rw-r--r--src/org/traccar/protocol/ManPowerProtocolDecoder.java2
-rw-r--r--src/org/traccar/protocol/MaxonProtocolDecoder.java4
-rw-r--r--src/org/traccar/protocol/Mta6ProtocolDecoder.java2
-rw-r--r--src/org/traccar/protocol/Pt3000ProtocolDecoder.java2
-rw-r--r--src/org/traccar/protocol/SkypatrolProtocolDecoder.java2
-rw-r--r--src/org/traccar/protocol/TaipProtocolDecoder.java2
-rw-r--r--src/org/traccar/protocol/Tk102ProtocolDecoder.java2
-rw-r--r--src/org/traccar/protocol/Tr20ProtocolDecoder.java4
-rw-r--r--src/org/traccar/protocol/XexunProtocolDecoder.java6
12 files changed, 17 insertions, 17 deletions
diff --git a/src/org/traccar/protocol/CarscopProtocolDecoder.java b/src/org/traccar/protocol/CarscopProtocolDecoder.java
index 3b2eb0016..41de9f130 100644
--- a/src/org/traccar/protocol/CarscopProtocolDecoder.java
+++ b/src/org/traccar/protocol/CarscopProtocolDecoder.java
@@ -32,7 +32,7 @@ public class CarscopProtocolDecoder extends BaseProtocolDecoder {
super(protocol);
}
- static private Pattern pattern = Pattern.compile(
+ private static final Pattern pattern = Pattern.compile(
"\\*.*" +
"(\\d{2})(\\d{2})(\\d{2})" + // Time (HHMMSS)
"([AV])" + // Validity
diff --git a/src/org/traccar/protocol/EasyTrackProtocolDecoder.java b/src/org/traccar/protocol/EasyTrackProtocolDecoder.java
index 0e4c60878..5cb73bbb0 100644
--- a/src/org/traccar/protocol/EasyTrackProtocolDecoder.java
+++ b/src/org/traccar/protocol/EasyTrackProtocolDecoder.java
@@ -32,7 +32,7 @@ public class EasyTrackProtocolDecoder extends BaseProtocolDecoder {
super(protocol);
}
- static private Pattern pattern = Pattern.compile(
+ private static final Pattern pattern = Pattern.compile(
"\\*..," + // Manufacturer
"(\\d+)," + // IMEI
"([^,]{2})," + // Command
diff --git a/src/org/traccar/protocol/Jt600ProtocolDecoder.java b/src/org/traccar/protocol/Jt600ProtocolDecoder.java
index d6eca3a53..8c1d2997b 100644
--- a/src/org/traccar/protocol/Jt600ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Jt600ProtocolDecoder.java
@@ -36,7 +36,7 @@ public class Jt600ProtocolDecoder extends BaseProtocolDecoder {
super(protocol);
}
- private Position decodeNormalMessage(ChannelBuffer buf, Channel channel) throws Exception {
+ private Position decodeNormalMessage(ChannelBuffer buf, Channel channel) {
Position position = new Position();
position.setProtocol(getProtocolName());
@@ -140,7 +140,7 @@ public class Jt600ProtocolDecoder extends BaseProtocolDecoder {
"(\\d+)," + // Alert Type
".*\\)");
- private Position decodeAlertMessage(ChannelBuffer buf, Channel channel) throws Exception {
+ private Position decodeAlertMessage(ChannelBuffer buf, Channel channel) {
String message = buf.toString(Charset.defaultCharset());
diff --git a/src/org/traccar/protocol/ManPowerProtocolDecoder.java b/src/org/traccar/protocol/ManPowerProtocolDecoder.java
index 73b902c48..d62c24a68 100644
--- a/src/org/traccar/protocol/ManPowerProtocolDecoder.java
+++ b/src/org/traccar/protocol/ManPowerProtocolDecoder.java
@@ -33,7 +33,7 @@ public class ManPowerProtocolDecoder extends BaseProtocolDecoder {
super(protocol);
}
- static private Pattern pattern = Pattern.compile(
+ private static final Pattern pattern = Pattern.compile(
"simei:" +
"(\\d+)," + // IMEI
"[^,]*,[^,]*," +
diff --git a/src/org/traccar/protocol/MaxonProtocolDecoder.java b/src/org/traccar/protocol/MaxonProtocolDecoder.java
index 5d5edfb60..8deb61abf 100644
--- a/src/org/traccar/protocol/MaxonProtocolDecoder.java
+++ b/src/org/traccar/protocol/MaxonProtocolDecoder.java
@@ -41,7 +41,7 @@ public class MaxonProtocolDecoder extends BaseProtocolDecoder {
super(protocol);
}
- static private Pattern pattern = Pattern.compile(
+ private static final Pattern pattern = Pattern.compile(
"\\$GPRMC," +
"(\\d{2})(\\d{2})(\\d{2})\\.(\\d{2})," + // Time (HHMMSS.SSS)
"([AV])," + // Validity
@@ -54,7 +54,7 @@ public class MaxonProtocolDecoder extends BaseProtocolDecoder {
"(\\d{2})(\\d{2})(\\d{2})" + // Date (DDMMYY)
".+"); // Other (Checksumm)
- static private Pattern gpfidPattern = Pattern.compile("\\$GPFID,(\\d+)$");
+ private static final Pattern gpfidPattern = Pattern.compile("\\$GPFID,(\\d+)$");
protected Object decode(
Channel channel, SocketAddress remoteAddress, Object msg)
diff --git a/src/org/traccar/protocol/Mta6ProtocolDecoder.java b/src/org/traccar/protocol/Mta6ProtocolDecoder.java
index 2a900acbf..86b191b0b 100644
--- a/src/org/traccar/protocol/Mta6ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Mta6ProtocolDecoder.java
@@ -39,7 +39,7 @@ import org.traccar.model.Position;
public class Mta6ProtocolDecoder extends BaseProtocolDecoder {
- private boolean simple;
+ private final boolean simple;
public Mta6ProtocolDecoder(Protocol protocol, boolean simple) {
super(protocol);
diff --git a/src/org/traccar/protocol/Pt3000ProtocolDecoder.java b/src/org/traccar/protocol/Pt3000ProtocolDecoder.java
index c6102e891..9fef4a605 100644
--- a/src/org/traccar/protocol/Pt3000ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Pt3000ProtocolDecoder.java
@@ -32,7 +32,7 @@ public class Pt3000ProtocolDecoder extends BaseProtocolDecoder {
super(protocol);
}
- static private Pattern pattern = Pattern.compile(
+ private static final Pattern pattern = Pattern.compile(
"%(\\d+)," + // IMEI
"\\$GPRMC," +
"(\\d{2})(\\d{2})(\\d{2})\\.?\\d*," + // Time (HHMMSS.SSS)
diff --git a/src/org/traccar/protocol/SkypatrolProtocolDecoder.java b/src/org/traccar/protocol/SkypatrolProtocolDecoder.java
index 39aa5c562..2f505154b 100644
--- a/src/org/traccar/protocol/SkypatrolProtocolDecoder.java
+++ b/src/org/traccar/protocol/SkypatrolProtocolDecoder.java
@@ -30,7 +30,7 @@ import org.traccar.model.Position;
public class SkypatrolProtocolDecoder extends BaseProtocolDecoder {
- private long defaultMask;
+ private final long defaultMask;
public SkypatrolProtocolDecoder(SkypatrolProtocol protocol) {
super(protocol);
diff --git a/src/org/traccar/protocol/TaipProtocolDecoder.java b/src/org/traccar/protocol/TaipProtocolDecoder.java
index b87134e73..8c1448193 100644
--- a/src/org/traccar/protocol/TaipProtocolDecoder.java
+++ b/src/org/traccar/protocol/TaipProtocolDecoder.java
@@ -30,7 +30,7 @@ import org.traccar.model.Position;
public class TaipProtocolDecoder extends BaseProtocolDecoder {
- boolean sendResponse;
+ private final boolean sendResponse;
public TaipProtocolDecoder(TaipProtocol protocol, boolean sendResponse) {
super(protocol);
diff --git a/src/org/traccar/protocol/Tk102ProtocolDecoder.java b/src/org/traccar/protocol/Tk102ProtocolDecoder.java
index 88d04a76f..47cd396cd 100644
--- a/src/org/traccar/protocol/Tk102ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Tk102ProtocolDecoder.java
@@ -32,7 +32,7 @@ public class Tk102ProtocolDecoder extends BaseProtocolDecoder {
super(protocol);
}
- static private Pattern pattern = Pattern.compile(
+ private static final Pattern pattern = Pattern.compile(
"\\[.\\d{10}.\\(\\p{Upper}+" +
"(\\d{2})(\\d{2})(\\d{2})" + // Time (HHMMSS)
"([AV])" + // Validity
diff --git a/src/org/traccar/protocol/Tr20ProtocolDecoder.java b/src/org/traccar/protocol/Tr20ProtocolDecoder.java
index fd6ef2d61..cdfb07549 100644
--- a/src/org/traccar/protocol/Tr20ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Tr20ProtocolDecoder.java
@@ -33,10 +33,10 @@ public class Tr20ProtocolDecoder extends BaseProtocolDecoder {
super(protocol);
}
- static private Pattern patternPing = Pattern.compile(
+ private static final Pattern patternPing = Pattern.compile(
"%%[^,]+,(\\d+)");
- static private Pattern patternData = Pattern.compile(
+ private static final Pattern patternData = Pattern.compile(
"%%" +
"([^,]+)," + // Id
"([AL])," + // Validity
diff --git a/src/org/traccar/protocol/XexunProtocolDecoder.java b/src/org/traccar/protocol/XexunProtocolDecoder.java
index 348c30bde..95676d2e2 100644
--- a/src/org/traccar/protocol/XexunProtocolDecoder.java
+++ b/src/org/traccar/protocol/XexunProtocolDecoder.java
@@ -29,14 +29,14 @@ import org.traccar.model.Position;
public class XexunProtocolDecoder extends BaseProtocolDecoder {
- private boolean full;
+ private final boolean full;
public XexunProtocolDecoder(XexunProtocol protocol, boolean full) {
super(protocol);
this.full = full;
}
- static private Pattern patternBasic = Pattern.compile(
+ private static final Pattern patternBasic = Pattern.compile(
"G[PN]RMC," +
"(\\d{2})(\\d{2})(\\d{2})\\.(\\d+)," + // Time (HHMMSS.SSS)
"([AV])," + // Validity
@@ -53,7 +53,7 @@ public class XexunProtocolDecoder extends BaseProtocolDecoder {
".*imei:" +
"(\\d+),"); // IMEI
- static private Pattern patternFull = Pattern.compile(
+ private static final Pattern patternFull = Pattern.compile(
"[\r\n]*" +
"(\\d+)," + // Serial
"([^,]+)?," + // Number