From ad7bdd5a5fe04841c941860a98501eef2a00207b Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 23 Jan 2016 10:46:10 +1300 Subject: Fix checkstyle issues in the project --- src/org/traccar/api/ObjectMapperProvider.java | 1 - src/org/traccar/protocol/GoSafeProtocolDecoder.java | 5 ++++- src/org/traccar/protocol/OsmAndProtocolDecoder.java | 3 +-- 3 files changed, 5 insertions(+), 4 deletions(-) (limited to 'src/org/traccar') diff --git a/src/org/traccar/api/ObjectMapperProvider.java b/src/org/traccar/api/ObjectMapperProvider.java index 50e8a3f3a..6f654118a 100644 --- a/src/org/traccar/api/ObjectMapperProvider.java +++ b/src/org/traccar/api/ObjectMapperProvider.java @@ -20,7 +20,6 @@ import com.fasterxml.jackson.databind.SerializationFeature; import javax.ws.rs.ext.ContextResolver; import javax.ws.rs.ext.Provider; -import java.text.SimpleDateFormat; @Provider public class ObjectMapperProvider implements ContextResolver { diff --git a/src/org/traccar/protocol/GoSafeProtocolDecoder.java b/src/org/traccar/protocol/GoSafeProtocolDecoder.java index 8be462ebf..dc9298e71 100644 --- a/src/org/traccar/protocol/GoSafeProtocolDecoder.java +++ b/src/org/traccar/protocol/GoSafeProtocolDecoder.java @@ -165,7 +165,10 @@ public class GoSafeProtocolDecoder extends BaseProtocolDecoder { } String sentence = (String) msg; - Pattern pattern = sentence.startsWith("*GS02") ? PATTERN_OLD : PATTERN; + Pattern pattern = PATTERN; + if (sentence.startsWith("*GS02")) { + pattern = PATTERN_OLD; + } Parser parser = new Parser(pattern, (String) msg); if (!parser.matches()) { diff --git a/src/org/traccar/protocol/OsmAndProtocolDecoder.java b/src/org/traccar/protocol/OsmAndProtocolDecoder.java index 775d1ed3d..f2810c461 100644 --- a/src/org/traccar/protocol/OsmAndProtocolDecoder.java +++ b/src/org/traccar/protocol/OsmAndProtocolDecoder.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 - 2015 Anton Tananaev (anton.tananaev@gmail.com) + * Copyright 2013 - 2016 Anton Tananaev (anton.tananaev@gmail.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,7 +33,6 @@ import org.jboss.netty.handler.codec.http.QueryStringDecoder; import org.traccar.BaseProtocolDecoder; import org.traccar.model.Event; import org.traccar.model.Position; -import sun.net.www.content.audio.basic; public class OsmAndProtocolDecoder extends BaseProtocolDecoder { -- cgit v1.2.3