From 8e0740ac9465b431ccc298b665b0750ed06a6b72 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Tue, 1 Mar 2016 13:48:16 +1300 Subject: Remove unused Java class imports --- src/org/traccar/api/CorsResponseFilter.java | 2 -- src/org/traccar/helper/ObdDecoder.java | 10 ++++------ src/org/traccar/protocol/Gl200ProtocolDecoder.java | 2 -- src/org/traccar/protocol/TelicProtocol.java | 1 - src/org/traccar/protocol/Tt8850ProtocolDecoder.java | 1 - 5 files changed, 4 insertions(+), 12 deletions(-) (limited to 'src/org') diff --git a/src/org/traccar/api/CorsResponseFilter.java b/src/org/traccar/api/CorsResponseFilter.java index 01d100d0a..178d08812 100644 --- a/src/org/traccar/api/CorsResponseFilter.java +++ b/src/org/traccar/api/CorsResponseFilter.java @@ -19,8 +19,6 @@ import org.jboss.netty.handler.codec.http.HttpHeaders; import org.traccar.Context; import java.io.IOException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; import javax.ws.rs.container.ContainerRequestContext; import javax.ws.rs.container.ContainerResponseContext; import javax.ws.rs.container.ContainerResponseFilter; diff --git a/src/org/traccar/helper/ObdDecoder.java b/src/org/traccar/helper/ObdDecoder.java index d847fb7c4..c2d9b1841 100644 --- a/src/org/traccar/helper/ObdDecoder.java +++ b/src/org/traccar/helper/ObdDecoder.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com) + * Copyright 2015 - 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. @@ -18,8 +18,6 @@ package org.traccar.helper; import org.traccar.model.Event; import java.util.AbstractMap; -import java.util.LinkedList; -import java.util.List; import java.util.Map; public final class ObdDecoder { @@ -62,9 +60,6 @@ public final class ObdDecoder { int numValue = Integer.parseInt(value.substring(i * 4, (i + 1) * 4), 16); codes.append(','); switch (numValue >> 14) { - case 0: - codes.append('P'); - break; case 1: codes.append('C'); break; @@ -74,6 +69,9 @@ public final class ObdDecoder { case 3: codes.append('U'); break; + default: + codes.append('P'); + break; } codes.append(String.format("%04X", numValue & 0x3FFF)); } diff --git a/src/org/traccar/protocol/Gl200ProtocolDecoder.java b/src/org/traccar/protocol/Gl200ProtocolDecoder.java index 71ccbd026..7dd60f44f 100644 --- a/src/org/traccar/protocol/Gl200ProtocolDecoder.java +++ b/src/org/traccar/protocol/Gl200ProtocolDecoder.java @@ -17,7 +17,6 @@ package org.traccar.protocol; import java.net.SocketAddress; import java.util.LinkedList; -import java.util.List; import java.util.regex.Pattern; import org.jboss.netty.channel.Channel; @@ -26,7 +25,6 @@ import org.traccar.Context; import org.traccar.helper.DateBuilder; import org.traccar.helper.Parser; import org.traccar.helper.PatternBuilder; -import org.traccar.helper.PatternUtil; import org.traccar.helper.UnitsConverter; import org.traccar.model.Event; import org.traccar.model.Position; diff --git a/src/org/traccar/protocol/TelicProtocol.java b/src/org/traccar/protocol/TelicProtocol.java index 6b8abcaeb..464892431 100644 --- a/src/org/traccar/protocol/TelicProtocol.java +++ b/src/org/traccar/protocol/TelicProtocol.java @@ -17,7 +17,6 @@ package org.traccar.protocol; import org.jboss.netty.bootstrap.ServerBootstrap; import org.jboss.netty.channel.ChannelPipeline; -import org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder; import org.jboss.netty.handler.codec.string.StringDecoder; import org.traccar.BaseProtocol; import org.traccar.TrackerServer; diff --git a/src/org/traccar/protocol/Tt8850ProtocolDecoder.java b/src/org/traccar/protocol/Tt8850ProtocolDecoder.java index c270d3364..526946eac 100644 --- a/src/org/traccar/protocol/Tt8850ProtocolDecoder.java +++ b/src/org/traccar/protocol/Tt8850ProtocolDecoder.java @@ -17,7 +17,6 @@ package org.traccar.protocol; import org.jboss.netty.channel.Channel; import org.traccar.BaseProtocolDecoder; -import org.traccar.Context; import org.traccar.helper.DateBuilder; import org.traccar.helper.Parser; import org.traccar.helper.PatternBuilder; -- cgit v1.2.3