diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2018-08-05 11:14:25 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2018-08-05 11:14:25 +1200 |
commit | fce9c91c820d8a01f9fdbe8cb5fa2a0f5a9c764c (patch) | |
tree | 108b6c514d7ecd3045e6dd13db0fbc26af94132e | |
parent | 495714f9322db11971d0349bc9c2b4a5ce7348e9 (diff) | |
download | traccar-server-fce9c91c820d8a01f9fdbe8cb5fa2a0f5a9c764c.tar.gz traccar-server-fce9c91c820d8a01f9fdbe8cb5fa2a0f5a9c764c.tar.bz2 traccar-server-fce9c91c820d8a01f9fdbe8cb5fa2a0f5a9c764c.zip |
Update Java dependencies and fix issues
-rw-r--r-- | findbugs.xml | 3 | ||||
-rw-r--r-- | pom.xml | 29 | ||||
-rw-r--r-- | src/org/traccar/Context.java | 3 | ||||
-rw-r--r-- | src/org/traccar/protocol/RoboTrackFrameDecoder.java | 2 | ||||
-rw-r--r-- | src/org/traccar/protocol/SabertekFrameDecoder.java | 2 |
5 files changed, 23 insertions, 16 deletions
diff --git a/findbugs.xml b/findbugs.xml index d7890baac..a97cd3cd4 100644 --- a/findbugs.xml +++ b/findbugs.xml @@ -1,6 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> <FindBugsFilter> <Match> + <Bug pattern="RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT" /> + </Match> + <Match> <Method name="~get.*Time" /> <Bug pattern="EI_EXPOSE_REP" /> </Match> @@ -30,7 +30,7 @@ <dependency> <groupId>joda-time</groupId> <artifactId>joda-time</artifactId> - <version>2.9.9</version> + <version>2.10</version> </dependency> <dependency> <groupId>commons-codec</groupId> @@ -50,7 +50,7 @@ <dependency> <groupId>org.postgresql</groupId> <artifactId>postgresql</artifactId> - <version>42.2.2.jre7</version> + <version>42.2.4.jre7</version> </dependency> <dependency> <groupId>com.microsoft.sqlserver</groupId> @@ -71,7 +71,7 @@ <dependency> <groupId>io.netty</groupId> <artifactId>netty-all</artifactId> - <version>4.1.25.Final</version> + <version>4.1.28.Final</version> </dependency> <dependency> <groupId>org.slf4j</groupId> @@ -131,7 +131,7 @@ <dependency> <groupId>org.liquibase</groupId> <artifactId>liquibase-core</artifactId> - <version>3.6.1</version> + <version>3.6.2</version> </dependency> <dependency> <groupId>javax.mail</groupId> @@ -141,12 +141,12 @@ <dependency> <groupId>org.jxls</groupId> <artifactId>jxls</artifactId> - <version>2.4.4</version> + <version>2.4.6</version> </dependency> <dependency> <groupId>org.jxls</groupId> <artifactId>jxls-poi</artifactId> - <version>1.0.14</version> + <version>1.0.15</version> </dependency> <dependency> <groupId>org.apache.velocity</groupId> @@ -161,7 +161,7 @@ <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-collections4</artifactId> <!-- Required by Velocity --> - <version>4.1</version> + <version>4.2</version> </dependency> <dependency> <groupId>org.mnode.ical4j</groupId> @@ -208,7 +208,7 @@ </plugin> <plugin> <artifactId>maven-dependency-plugin</artifactId> - <version>3.0.2</version> + <version>3.1.1</version> <executions> <execution> <phase>package</phase> @@ -224,7 +224,7 @@ </plugin> <plugin> <artifactId>maven-jar-plugin</artifactId> - <version>3.0.2</version> + <version>3.1.0</version> <configuration> <archive> <manifest> @@ -295,7 +295,7 @@ <dependency> <groupId>org.codehaus.mojo</groupId> <artifactId>extra-enforcer-rules</artifactId> - <version>1.0-beta-7</version> + <version>1.0-beta-9</version> </dependency> </dependencies> </plugin> @@ -325,7 +325,14 @@ </plugin> <plugin> <artifactId>maven-pmd-plugin</artifactId> - <version>3.9.0</version> + <version>3.10.0</version> + <reportSets> + <reportSet> + <reports> + <report>pmd</report> + </reports> + </reportSet> + </reportSets> </plugin> </plugins> </reporting> diff --git a/src/org/traccar/Context.java b/src/org/traccar/Context.java index 2afdde3b9..d607baf3e 100644 --- a/src/org/traccar/Context.java +++ b/src/org/traccar/Context.java @@ -87,9 +87,6 @@ import javax.ws.rs.client.ClientBuilder; public final class Context { - private static final String USER_AGENT = - "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0"; - private Context() { } diff --git a/src/org/traccar/protocol/RoboTrackFrameDecoder.java b/src/org/traccar/protocol/RoboTrackFrameDecoder.java index aecbaaa3b..85ed6c76f 100644 --- a/src/org/traccar/protocol/RoboTrackFrameDecoder.java +++ b/src/org/traccar/protocol/RoboTrackFrameDecoder.java @@ -23,7 +23,7 @@ import org.traccar.BaseFrameDecoder; public class RoboTrackFrameDecoder extends BaseFrameDecoder { private int messageLength(ByteBuf buf) { - switch ((int) buf.getByte(buf.readerIndex())) { + switch (buf.getUnsignedByte(buf.readerIndex())) { case RoboTrackProtocolDecoder.MSG_ID: return 69; case RoboTrackProtocolDecoder.MSG_ACK: diff --git a/src/org/traccar/protocol/SabertekFrameDecoder.java b/src/org/traccar/protocol/SabertekFrameDecoder.java index 771ef9cfb..ad5000bf8 100644 --- a/src/org/traccar/protocol/SabertekFrameDecoder.java +++ b/src/org/traccar/protocol/SabertekFrameDecoder.java @@ -29,7 +29,7 @@ public class SabertekFrameDecoder extends BaseFrameDecoder { int beginIndex = buf.indexOf(buf.readerIndex(), buf.writerIndex(), (byte) 0x02); if (beginIndex >= 0) { int endIndex = buf.indexOf(buf.readerIndex(), buf.writerIndex(), (byte) 0x03); - if (beginIndex >= 0) { + if (endIndex >= 0) { buf.readerIndex(beginIndex + 1); ByteBuf frame = buf.readRetainedSlice(endIndex - beginIndex - 1); buf.readerIndex(endIndex + 1); |