aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/Gl200ProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-10-07 18:50:10 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-10-07 18:50:10 +1300
commitc344d4086bb2179d485c9b25af4d737e26f23221 (patch)
treef937934f07951e0ec8f8281528bd1ba9664c2d3f /src/org/traccar/protocol/Gl200ProtocolDecoder.java
parent4a5961a98b0b6576e4c6553435a70a7bca3f9b44 (diff)
downloadtrackermap-server-c344d4086bb2179d485c9b25af4d737e26f23221.tar.gz
trackermap-server-c344d4086bb2179d485c9b25af4d737e26f23221.tar.bz2
trackermap-server-c344d4086bb2179d485c9b25af4d737e26f23221.zip
Rename pattern to upper case style
Diffstat (limited to 'src/org/traccar/protocol/Gl200ProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/Gl200ProtocolDecoder.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/org/traccar/protocol/Gl200ProtocolDecoder.java b/src/org/traccar/protocol/Gl200ProtocolDecoder.java
index 88b9669c8..a0417c9bc 100644
--- a/src/org/traccar/protocol/Gl200ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Gl200ProtocolDecoder.java
@@ -33,13 +33,13 @@ public class Gl200ProtocolDecoder extends BaseProtocolDecoder {
super(protocol);
}
- private static final Pattern heartbeatPattern = Pattern.compile(
+ private static final Pattern PATTERN_HEARTBEAT = Pattern.compile(
"\\+ACK:GTHBD," +
"([0-9A-Z]{2}\\p{XDigit}{4})," +
".*," +
"(\\p{XDigit}{4})\\$?");
- private static final Pattern pattern = Pattern.compile(
+ private static final Pattern PATTERN = Pattern.compile(
"(?:(?:\\+(?:RESP|BUFF):)|" +
"(?:\\x00?\\x04,\\p{XDigit}{4},[01],))" +
"GT...," +
@@ -93,7 +93,7 @@ public class Gl200ProtocolDecoder extends BaseProtocolDecoder {
String sentence = (String) msg;
// Handle heartbeat
- Matcher parser = heartbeatPattern.matcher(sentence);
+ Matcher parser = PATTERN_HEARTBEAT.matcher(sentence);
if (parser.matches()) {
if (channel != null) {
channel.write("+SACK:GTHBD," + parser.group(1) + "," + parser.group(2) + "$", remoteAddress);
@@ -102,7 +102,7 @@ public class Gl200ProtocolDecoder extends BaseProtocolDecoder {
}
// Parse message
- parser = pattern.matcher(sentence);
+ parser = PATTERN.matcher(sentence);
if (!parser.matches()) {
return null;
}