Enable PMD rule PrimitiveWrapperInstantiation and fix violations

This commit is contained in:
Manuel Fuhr 2023-05-09 22:13:57 +02:00
parent 7a6d3bd9d9
commit 28f205c1ad
12 changed files with 20 additions and 21 deletions

View file

@ -14,7 +14,7 @@ public class IpAccessMonitor {
long t = System.currentTimeMillis();
synchronized (sync) {
Long lastTime = ipAccess.get(ip);
ipAccess.put(ip, Long.valueOf(t));
ipAccess.put(ip, t);
return lastTime == null || t - lastTime.longValue() > MAX_IDLE;
}
}

View file

@ -195,7 +195,7 @@ public class RouteServer extends Thread implements Comparable<RouteServer> {
if ("timode".equals(e.getKey())) {
rc.turnInstructionMode = Integer.parseInt(e.getValue());
} else if ("heading".equals(e.getKey())) {
rc.startDirection = Integer.valueOf(Integer.parseInt(e.getValue()));
rc.startDirection = Integer.parseInt(e.getValue());
rc.forceUseStartDirection = true;
} else if (e.getKey().startsWith("profile:")) {
if (rc.keyValues == null) {
@ -205,7 +205,7 @@ public class RouteServer extends Thread implements Comparable<RouteServer> {
} else if (e.getKey().equals("straight")) {
String[] sa = e.getValue().split(",");
for (int i = 0; i < sa.length; i++) {
int v = Integer.valueOf(sa[i]);
int v = Integer.parseInt(sa[i]);
if (wplist.size() > v) wplist.get(v).direct = true;
}
}