aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-03-21 09:47:14 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2016-03-21 09:47:14 +1300
commit1a8595f2933e9bd83c89323370f6be2506f52e7f (patch)
treed28e828f150b62ff00d1996d53e9c70dd53101a8
parent36733f47365f97bc912d1179004e33e0ef9ee281 (diff)
downloadtrackermap-server-1a8595f2933e9bd83c89323370f6be2506f52e7f.tar.gz
trackermap-server-1a8595f2933e9bd83c89323370f6be2506f52e7f.tar.bz2
trackermap-server-1a8595f2933e9bd83c89323370f6be2506f52e7f.zip
Use reluctant modifier for any
-rw-r--r--src/org/traccar/helper/PatternBuilder.java2
-rw-r--r--test/org/traccar/protocol/Gl200ProtocolDecoderTest.java3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/org/traccar/helper/PatternBuilder.java b/src/org/traccar/helper/PatternBuilder.java
index 3a8bdd868..1e7613043 100644
--- a/src/org/traccar/helper/PatternBuilder.java
+++ b/src/org/traccar/helper/PatternBuilder.java
@@ -56,7 +56,7 @@ public class PatternBuilder {
}
public PatternBuilder any() {
- fragments.add(".*");
+ fragments.add(".*?");
return this;
}
diff --git a/test/org/traccar/protocol/Gl200ProtocolDecoderTest.java b/test/org/traccar/protocol/Gl200ProtocolDecoderTest.java
index 6e6049f4b..4bb66d960 100644
--- a/test/org/traccar/protocol/Gl200ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/Gl200ProtocolDecoderTest.java
@@ -11,6 +11,9 @@ public class Gl200ProtocolDecoderTest extends ProtocolTest {
Gl200ProtocolDecoder decoder = new Gl200ProtocolDecoder(new Gl200Protocol());
verifyPosition(decoder, text(
+ "+RESP:GTSTT,060228,862894020178276,,21,0,0.0,0,411.3,-63.169745,-17.776330,20160319132220,0736,0003,6AD4,5BAA,00,20160319092223,1FBD$"));
+
+ verifyPosition(decoder, text(
"+RESP:GTNMR,210102,A10000458356CE,,0,1,1,9,0.0,8,190.7,-85.765865,42.894837,20160316123202,,,,,60,30,20160316123202,0137$"));
verifyPosition(decoder, text(