aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar')
-rw-r--r--src/org/traccar/DetectorHandler.java2
-rw-r--r--src/org/traccar/ServerManager.java2
-rw-r--r--src/org/traccar/protocol/AplicomFrameDecoder.java2
-rw-r--r--src/org/traccar/protocol/Gl200ProtocolDecoder.java2
-rw-r--r--src/org/traccar/protocol/GlobalSatProtocolDecoder.java2
-rw-r--r--src/org/traccar/protocol/OrionProtocolDecoder.java2
-rw-r--r--src/org/traccar/protocol/ProgressProtocolDecoder.java2
-rw-r--r--src/org/traccar/protocol/RuptelaProtocolDecoder.java2
-rw-r--r--src/org/traccar/protocol/Stl060FrameDecoder.java2
-rw-r--r--src/org/traccar/protocol/TotemProtocolEncoder.java2
-rw-r--r--src/org/traccar/web/JsonConverter.java2
11 files changed, 10 insertions, 12 deletions
diff --git a/src/org/traccar/DetectorHandler.java b/src/org/traccar/DetectorHandler.java
index 52e5e9bce..8bc63fd1c 100644
--- a/src/org/traccar/DetectorHandler.java
+++ b/src/org/traccar/DetectorHandler.java
@@ -104,7 +104,7 @@ public class DetectorHandler extends SimpleChannelHandler {
if (!server.getProtocol().equals("detector")) {
checkPipeline(server.getProtocol(), server.getPipelineFactory().getPipeline(), buf);
}
- } catch(Exception error) {
+ } catch (Exception error) {
if (showFailed) {
Log.info("Protocol " + server.getProtocol() + " error");
}
diff --git a/src/org/traccar/ServerManager.java b/src/org/traccar/ServerManager.java
index bf5232420..27e0fda05 100644
--- a/src/org/traccar/ServerManager.java
+++ b/src/org/traccar/ServerManager.java
@@ -43,7 +43,7 @@ public class ServerManager {
String jarFileName = URLDecoder.decode(packageUrl.getFile(), "UTF-8");
try (JarFile jf = new JarFile(jarFileName.substring(5, jarFileName.indexOf("!")))) {
Enumeration<JarEntry> jarEntries = jf.entries();
- while(jarEntries.hasMoreElements()){
+ while (jarEntries.hasMoreElements()) {
String entryName = jarEntries.nextElement().getName();
if (entryName.startsWith(packagePath) && entryName.length() > packagePath.length() + 5) {
names.add(entryName.substring(packagePath.length() + 1, entryName.lastIndexOf('.')));
diff --git a/src/org/traccar/protocol/AplicomFrameDecoder.java b/src/org/traccar/protocol/AplicomFrameDecoder.java
index 7dec3b511..85fb5404c 100644
--- a/src/org/traccar/protocol/AplicomFrameDecoder.java
+++ b/src/org/traccar/protocol/AplicomFrameDecoder.java
@@ -20,7 +20,7 @@ import org.jboss.netty.channel.Channel;
import org.jboss.netty.channel.ChannelHandlerContext;
import org.jboss.netty.handler.codec.frame.FrameDecoder;
-public class AplicomFrameDecoder extends FrameDecoder{
+public class AplicomFrameDecoder extends FrameDecoder {
@Override
protected Object decode(
diff --git a/src/org/traccar/protocol/Gl200ProtocolDecoder.java b/src/org/traccar/protocol/Gl200ProtocolDecoder.java
index a0417c9bc..396b0315c 100644
--- a/src/org/traccar/protocol/Gl200ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Gl200ProtocolDecoder.java
@@ -65,7 +65,7 @@ public class Gl200ProtocolDecoder extends BaseProtocolDecoder {
"(\\p{XDigit}*)," + // DTCs
"(\\d{1,3})," + // Throttle
"\\d{1,3}," + // Engine load
- "(\\d{1,3})?,"+ // Fuel level
+ "(\\d{1,3})?," + // Fuel level
"(\\d+)|.*)," + // Odometer
"(\\d*)," + // GPS accuracy
diff --git a/src/org/traccar/protocol/GlobalSatProtocolDecoder.java b/src/org/traccar/protocol/GlobalSatProtocolDecoder.java
index 617c18b71..e751524af 100644
--- a/src/org/traccar/protocol/GlobalSatProtocolDecoder.java
+++ b/src/org/traccar/protocol/GlobalSatProtocolDecoder.java
@@ -85,7 +85,7 @@ public class GlobalSatProtocolDecoder extends BaseProtocolDecoder {
for (int formatIndex = 0, valueIndex = 1; formatIndex < format.length() && valueIndex < values.length; formatIndex++) {
String value = values[valueIndex];
- switch(format.charAt(formatIndex)) {
+ switch (format.charAt(formatIndex)) {
case 'S':
if (!identify(value, channel)) {
return null;
diff --git a/src/org/traccar/protocol/OrionProtocolDecoder.java b/src/org/traccar/protocol/OrionProtocolDecoder.java
index 9b4561e2e..6dcc19db5 100644
--- a/src/org/traccar/protocol/OrionProtocolDecoder.java
+++ b/src/org/traccar/protocol/OrionProtocolDecoder.java
@@ -92,7 +92,7 @@ public class OrionProtocolDecoder extends BaseProtocolDecoder {
// Location
position.setLatitude(convertCoordinate(buf.readInt()));
position.setLongitude(convertCoordinate(buf.readInt()));
- position.setAltitude(buf.readShort()/ 10.0);
+ position.setAltitude(buf.readShort() / 10.0);
position.setCourse(buf.readUnsignedShort());
position.setSpeed(buf.readUnsignedShort() * 0.0539957);
diff --git a/src/org/traccar/protocol/ProgressProtocolDecoder.java b/src/org/traccar/protocol/ProgressProtocolDecoder.java
index fa7b1e3a9..08d2b12bc 100644
--- a/src/org/traccar/protocol/ProgressProtocolDecoder.java
+++ b/src/org/traccar/protocol/ProgressProtocolDecoder.java
@@ -183,7 +183,7 @@ public class ProgressProtocolDecoder extends BaseProtocolDecoder {
// Send response for alarm message
if (type == MSG_ALARM) {
- byte[] response = {(byte)0xC9,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
+ byte[] response = {(byte) 0xC9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
channel.write(ChannelBuffers.wrappedBuffer(response));
position.set(Event.KEY_ALARM, true);
diff --git a/src/org/traccar/protocol/RuptelaProtocolDecoder.java b/src/org/traccar/protocol/RuptelaProtocolDecoder.java
index ebb88faf4..45925d5d1 100644
--- a/src/org/traccar/protocol/RuptelaProtocolDecoder.java
+++ b/src/org/traccar/protocol/RuptelaProtocolDecoder.java
@@ -114,7 +114,7 @@ public class RuptelaProtocolDecoder extends BaseProtocolDecoder {
// Acknowledgement
if (channel != null) {
- byte[] response = {0x00, 0x02, 0x64, 0x01, 0x13, (byte)0xbc};
+ byte[] response = {0x00, 0x02, 0x64, 0x01, 0x13, (byte) 0xbc};
channel.write(ChannelBuffers.wrappedBuffer(response));
}
diff --git a/src/org/traccar/protocol/Stl060FrameDecoder.java b/src/org/traccar/protocol/Stl060FrameDecoder.java
index bdb33b01b..119abfbe3 100644
--- a/src/org/traccar/protocol/Stl060FrameDecoder.java
+++ b/src/org/traccar/protocol/Stl060FrameDecoder.java
@@ -16,10 +16,8 @@
package org.traccar.protocol;
import org.jboss.netty.buffer.ChannelBuffer;
-import org.jboss.netty.buffer.ChannelBuffers;
import org.jboss.netty.channel.Channel;
import org.jboss.netty.channel.ChannelHandlerContext;
-import org.jboss.netty.handler.codec.frame.DelimiterBasedFrameDecoder;
import org.traccar.CharacterDelimiterFrameDecoder;
import org.traccar.helper.ChannelBufferTools;
diff --git a/src/org/traccar/protocol/TotemProtocolEncoder.java b/src/org/traccar/protocol/TotemProtocolEncoder.java
index 56d6bfa92..c44d55788 100644
--- a/src/org/traccar/protocol/TotemProtocolEncoder.java
+++ b/src/org/traccar/protocol/TotemProtocolEncoder.java
@@ -19,7 +19,7 @@ package org.traccar.protocol;
import org.traccar.StringProtocolEncoder;
import org.traccar.model.Command;
-public class TotemProtocolEncoder extends StringProtocolEncoder{
+public class TotemProtocolEncoder extends StringProtocolEncoder {
@Override
protected Object encodeCommand(Command command) {
diff --git a/src/org/traccar/web/JsonConverter.java b/src/org/traccar/web/JsonConverter.java
index 5dc879ab8..d8681cc3a 100644
--- a/src/org/traccar/web/JsonConverter.java
+++ b/src/org/traccar/web/JsonConverter.java
@@ -97,7 +97,7 @@ public class JsonConverter {
Method[] methods = object.getClass().getMethods();
for (Method method : methods) {
- if(method.isAnnotationPresent(JsonIgnore.class)) {
+ if (method.isAnnotationPresent(JsonIgnore.class)) {
continue;
}
if (method.getName().startsWith("get") && method.getParameterTypes().length == 0) {