aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2013-09-18 19:11:54 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2013-09-18 19:11:54 +1200
commit505cbf7678054d5bb0682ac8b3a468d951e20095 (patch)
treecd5470d5e96fc75b6b431e25c834a80d02ff549e
parente20baccccc1aff70db085dc647cb1887f071c92c (diff)
downloadtrackermap-server-505cbf7678054d5bb0682ac8b3a468d951e20095.tar.gz
trackermap-server-505cbf7678054d5bb0682ac8b3a468d951e20095.tar.bz2
trackermap-server-505cbf7678054d5bb0682ac8b3a468d951e20095.zip
Fix DataSource initialization
-rw-r--r--src/org/traccar/http/WebServer.java2
-rw-r--r--test/org/traccar/protocol/H02ProtocolDecoderTest.java3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/org/traccar/http/WebServer.java b/src/org/traccar/http/WebServer.java
index 0fd5b952e..2745cd7b8 100644
--- a/src/org/traccar/http/WebServer.java
+++ b/src/org/traccar/http/WebServer.java
@@ -55,7 +55,7 @@ public class WebServer {
if (clazz != null) {
DataSource ds = (DataSource) clazz.newInstance();
- clazz.getMethod("setUrl", String.class).invoke(ds, properties.getProperty("database.url"));
+ clazz.getMethod("setURL", String.class).invoke(ds, properties.getProperty("database.url"));
clazz.getMethod("setUser", String.class).invoke(ds, properties.getProperty("database.user"));
clazz.getMethod("setPassword", String.class).invoke(ds, properties.getProperty("database.password"));
diff --git a/test/org/traccar/protocol/H02ProtocolDecoderTest.java b/test/org/traccar/protocol/H02ProtocolDecoderTest.java
index 8c998c655..b5d71be18 100644
--- a/test/org/traccar/protocol/H02ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/H02ProtocolDecoderTest.java
@@ -20,6 +20,9 @@ public class H02ProtocolDecoderTest {
assertNotNull(decoder.decode(null, null, ChannelBuffers.copiedBuffer(
"*HQ,3800008786,V1,062507,V,3048.2437,N,03058.5617,E,000.00,000,250413,FFFFFBFF#", Charset.defaultCharset())));
+
+ assertNotNull(decoder.decode(null, null, ChannelBuffers.copiedBuffer(
+ "*HQ,4300256455,V1,111817,A,1935.5128,N,04656.3243,E,0.00,100,170913,FFE7FBFF#", Charset.defaultCharset())));
assertNotNull(decoder.decode(null, null, ChannelBuffers.copiedBuffer(
"*HQ,123456789012345,V1,155850,A,5214.5346,N,2117.4683,E,0.00,270.90,131012,ffffffff,000000,000000,000000,000000#", Charset.defaultCharset())));