aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2019-08-24 14:32:55 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2019-08-24 14:32:55 -0700
commit8b23656543c91826a9855e96f451d04b9c84504a (patch)
tree56f83f5a8fca8bef2d13500da2af808d0200e1de
parent5f59de8e7f4b5bd10362c215f90c8a52dc78ff1a (diff)
downloadtraccar-server-8b23656543c91826a9855e96f451d04b9c84504a.tar.gz
traccar-server-8b23656543c91826a9855e96f451d04b9c84504a.tar.bz2
traccar-server-8b23656543c91826a9855e96f451d04b9c84504a.zip
Fix PMD issues
-rw-r--r--build.gradle2
-rw-r--r--pom.xml2
-rw-r--r--setup/traccar.iss2
-rw-r--r--src/main/java/org/traccar/protocol/BceProtocolDecoder.java4
-rw-r--r--src/main/java/org/traccar/protocol/GranitProtocol.java2
-rw-r--r--src/main/java/org/traccar/protocol/LaipacProtocolDecoder.java2
-rw-r--r--src/main/java/org/traccar/protocol/SigfoxProtocolDecoder.java2
-rw-r--r--src/main/java/org/traccar/protocol/WondexProtocol.java2
-rw-r--r--swagger.json2
9 files changed, 10 insertions, 10 deletions
diff --git a/build.gradle b/build.gradle
index f744cbf5f..0842a6a0f 100644
--- a/build.gradle
+++ b/build.gradle
@@ -80,7 +80,7 @@ jar {
manifest {
attributes(
"Main-Class": "org.traccar.Main",
- "Implementation-Version": "4.4",
+ "Implementation-Version": "4.6",
"Class-Path": configurations.runtimeClasspath.files.collect { "lib/$it.name" }.join(" "))
}
}
diff --git a/pom.xml b/pom.xml
index 0bece8eb6..3562ef149 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.traccar</groupId>
<artifactId>traccar</artifactId>
- <version>4.5-SNAPSHOT</version>
+ <version>4.6-SNAPSHOT</version>
<name>traccar</name>
<url>https://www.traccar.org</url>
diff --git a/setup/traccar.iss b/setup/traccar.iss
index 3c0ddd0cf..9a4fc65b9 100644
--- a/setup/traccar.iss
+++ b/setup/traccar.iss
@@ -1,6 +1,6 @@
[Setup]
AppName=Traccar
-AppVersion=4.5
+AppVersion=4.6
DefaultDirName={pf}\Traccar
OutputBaseFilename=traccar-setup
ArchitecturesInstallIn64BitMode=x64
diff --git a/src/main/java/org/traccar/protocol/BceProtocolDecoder.java b/src/main/java/org/traccar/protocol/BceProtocolDecoder.java
index ad7271f2f..f07338937 100644
--- a/src/main/java/org/traccar/protocol/BceProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/BceProtocolDecoder.java
@@ -97,7 +97,7 @@ public class BceProtocolDecoder extends BaseProtocolDecoder {
}
}
- private void decodeMask2(ByteBuf buf, int mask, Position position) {
+ private void decodeMask2(ByteBuf buf, int mask) {
if (BitUtil.check(mask, 0)) {
buf.readUnsignedShortLE(); // wheel speed
@@ -223,7 +223,7 @@ public class BceProtocolDecoder extends BaseProtocolDecoder {
if (masks.size() >= 2) {
mask = masks.get(1);
- decodeMask2(buf, mask, position);
+ decodeMask2(buf, mask);
}
if (masks.size() >= 3) {
diff --git a/src/main/java/org/traccar/protocol/GranitProtocol.java b/src/main/java/org/traccar/protocol/GranitProtocol.java
index cc5b125f1..244c3977b 100644
--- a/src/main/java/org/traccar/protocol/GranitProtocol.java
+++ b/src/main/java/org/traccar/protocol/GranitProtocol.java
@@ -28,7 +28,7 @@ public class GranitProtocol extends BaseProtocol {
Command.TYPE_IDENTIFICATION,
Command.TYPE_REBOOT_DEVICE,
Command.TYPE_POSITION_SINGLE);
- setTextCommandEncoder(new GranitProtocolSmsEncoder(GranitProtocol.this));
+ setTextCommandEncoder(new GranitProtocolSmsEncoder(this));
setSupportedTextCommands(
Command.TYPE_REBOOT_DEVICE,
Command.TYPE_POSITION_PERIODIC);
diff --git a/src/main/java/org/traccar/protocol/LaipacProtocolDecoder.java b/src/main/java/org/traccar/protocol/LaipacProtocolDecoder.java
index 06a379862..0c72568f3 100644
--- a/src/main/java/org/traccar/protocol/LaipacProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/LaipacProtocolDecoder.java
@@ -245,7 +245,7 @@ public class LaipacProtocolDecoder extends BaseProtocolDecoder {
position.setNetwork(new Network(CellTower.from(mcc, mnc, lac, cid)));
}
- String unused = parser.next();
+ parser.next(); // unused
String checksum = parser.next();
diff --git a/src/main/java/org/traccar/protocol/SigfoxProtocolDecoder.java b/src/main/java/org/traccar/protocol/SigfoxProtocolDecoder.java
index 0e0d8d608..7e0e3e110 100644
--- a/src/main/java/org/traccar/protocol/SigfoxProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/SigfoxProtocolDecoder.java
@@ -70,7 +70,7 @@ public class SigfoxProtocolDecoder extends BaseHttpProtocolDecoder {
ByteBuf buf = Unpooled.wrappedBuffer(DataConverter.parseHex(data));
try {
int event = buf.readUnsignedByte();
- if ((event >> 4) == 0) {
+ if (event >> 4 == 0) {
position.setValid(true);
position.setLatitude(buf.readIntLE() * 0.0000001);
diff --git a/src/main/java/org/traccar/protocol/WondexProtocol.java b/src/main/java/org/traccar/protocol/WondexProtocol.java
index 82a18840e..035dd9160 100644
--- a/src/main/java/org/traccar/protocol/WondexProtocol.java
+++ b/src/main/java/org/traccar/protocol/WondexProtocol.java
@@ -25,7 +25,6 @@ import io.netty.handler.codec.string.StringEncoder;
public class WondexProtocol extends BaseProtocol {
public WondexProtocol() {
- setTextCommandEncoder(new WondexProtocolEncoder(WondexProtocol.this));
setSupportedCommands(
Command.TYPE_GET_DEVICE_STATUS,
Command.TYPE_GET_MODEM_STATUS,
@@ -33,6 +32,7 @@ public class WondexProtocol extends BaseProtocol {
Command.TYPE_POSITION_SINGLE,
Command.TYPE_GET_VERSION,
Command.TYPE_IDENTIFICATION);
+ setTextCommandEncoder(new WondexProtocolEncoder(this));
addServer(new TrackerServer(false, getName()) {
@Override
protected void addProtocolHandlers(PipelineBuilder pipeline) {
diff --git a/swagger.json b/swagger.json
index 41e54df17..917892e65 100644
--- a/swagger.json
+++ b/swagger.json
@@ -1,7 +1,7 @@
{
"swagger": "2.0",
"info": {
- "version": "4.5",
+ "version": "4.6",
"title": "traccar"
},
"host": "demo.traccar.org",