aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/MeiligaoProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2012-06-20 22:06:51 +0400
committerAnton Tananaev <anton.tananaev@gmail.com>2012-06-20 22:06:51 +0400
commit23bf37045d96197ed43a02b48b9996103922593a (patch)
treede71e359adb9d4a521266237ba64cc33cef0e83c /src/org/traccar/protocol/MeiligaoProtocolDecoder.java
parent15d13a99d3215a3208b2c44a07a29a7af9c13de3 (diff)
downloadtrackermap-server-23bf37045d96197ed43a02b48b9996103922593a.tar.gz
trackermap-server-23bf37045d96197ed43a02b48b9996103922593a.tar.bz2
trackermap-server-23bf37045d96197ed43a02b48b9996103922593a.zip
Optimize strings
Diffstat (limited to 'src/org/traccar/protocol/MeiligaoProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/MeiligaoProtocolDecoder.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/org/traccar/protocol/MeiligaoProtocolDecoder.java b/src/org/traccar/protocol/MeiligaoProtocolDecoder.java
index c3b376c65..db007f936 100644
--- a/src/org/traccar/protocol/MeiligaoProtocolDecoder.java
+++ b/src/org/traccar/protocol/MeiligaoProtocolDecoder.java
@@ -128,7 +128,7 @@ public class MeiligaoProtocolDecoder extends GenericProtocolDecoder {
// Create new position
Position position = new Position();
- String extendedInfo = "<protocol>meiligao</protocol>";
+ StringBuilder extendedInfo = new StringBuilder("<protocol>meiligao</protocol>");
// Get device by id
// TODO: change imei to unique id
@@ -184,7 +184,9 @@ public class MeiligaoProtocolDecoder extends GenericProtocolDecoder {
position.setTime(time.getTime());
// Dilution of precision
- extendedInfo += "<hdop>" + parser.group(index++) + "</hdop>";
+ extendedInfo.append("<hdop>");
+ extendedInfo.append(parser.group(index++));
+ extendedInfo.append("</hdop>");
// Altitude
String altitude = parser.group(index++);
@@ -195,10 +197,12 @@ public class MeiligaoProtocolDecoder extends GenericProtocolDecoder {
}
// State
- extendedInfo += "<state>" + parser.group(index++) + "</state>";
+ extendedInfo.append("<state>");
+ extendedInfo.append(parser.group(index++));
+ extendedInfo.append("</state>");
// Extended info
- position.setExtendedInfo(extendedInfo);
+ position.setExtendedInfo(extendedInfo.toString());
return position;
}