diff options
-rw-r--r-- | pom.xml | 13 | ||||
-rw-r--r-- | src/org/traccar/WebDataHandler.java | 12 |
2 files changed, 12 insertions, 13 deletions
@@ -49,13 +49,12 @@ <dependency> <groupId>com.ning</groupId> <artifactId>async-http-client</artifactId> - <version>1.9.29</version> - <exclusions> - <exclusion> - <artifactId>slf4j-api</artifactId> - <groupId>org.slf4j</groupId> - </exclusion> - </exclusions> + <version>1.9.30</version> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-simple</artifactId> + <version>1.7.12</version> </dependency> <dependency> <groupId>org.glassfish</groupId> diff --git a/src/org/traccar/WebDataHandler.java b/src/org/traccar/WebDataHandler.java index fce73c816..5e3626022 100644 --- a/src/org/traccar/WebDataHandler.java +++ b/src/org/traccar/WebDataHandler.java @@ -63,12 +63,12 @@ public class WebDataHandler extends BaseDataHandler { Device device = Context.getIdentityManager().getDeviceById(position.getDeviceId()); String request = url. - replaceAll("\\{uniqueId}", device.getUniqueId()). - replaceAll("\\{deviceId}", String.valueOf(device.getId())). - replaceAll("\\{fixTime}", String.valueOf(position.getFixTime().getTime())). - replaceAll("\\{latitude}", String.valueOf(position.getLatitude())). - replaceAll("\\{longitude}", String.valueOf(position.getLongitude())). - replaceAll("\\{gprmc}", formatSentence(position)); + replace("{uniqueId}", device.getUniqueId()). + replace("{deviceId}", String.valueOf(device.getId())). + replace("{fixTime}", String.valueOf(position.getFixTime().getTime())). + replace("{latitude}", String.valueOf(position.getLatitude())). + replace("{longitude}", String.valueOf(position.getLongitude())). + replace("{gprmc}", formatSentence(position)); AsyncHttpClient asyncHttpClient = new AsyncHttpClient(); asyncHttpClient.prepareGet(request).execute(); |