Fix newly detected violations from PMD 7
This commit is contained in:
parent
2f7ce42480
commit
dd896347a2
28 changed files with 65 additions and 57 deletions
|
|
@ -31,7 +31,6 @@ final class OsmFile {
|
|||
|
||||
private int divisor;
|
||||
private int cellsize;
|
||||
private int ncaches;
|
||||
private int indexsize;
|
||||
protected byte elevationType = 3;
|
||||
|
||||
|
|
@ -47,7 +46,7 @@ final class OsmFile {
|
|||
elevationType = rafile.elevationType;
|
||||
|
||||
cellsize = 1000000 / divisor;
|
||||
ncaches = divisor * divisor;
|
||||
int ncaches = divisor * divisor;
|
||||
indexsize = ncaches * 4;
|
||||
|
||||
byte[] iobuffer = dataBuffers.iobuffer;
|
||||
|
|
@ -143,7 +142,7 @@ final class OsmFile {
|
|||
new DirectWeaver(bc, dataBuffers, lonIdx, latIdx, divisor, wayValidator, waypointMatcher, hollowNodes);
|
||||
return MicroCache.emptyNonVirgin;
|
||||
} finally {
|
||||
// crc check only if the buffer has not been fully read
|
||||
// crc check only if the buffer has not been fully read
|
||||
int readBytes = (bc.getReadingBitPosition() + 7) >> 3;
|
||||
if (readBytes != asize - 4) {
|
||||
int crcData = Crc32.crc(ab, 0, asize - 4);
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ public class OsmNodePairSet {
|
|||
n2a = new long[maxTempNodes];
|
||||
}
|
||||
|
||||
private static class OsmNodePair {
|
||||
private static final class OsmNodePair {
|
||||
public long node2;
|
||||
public OsmNodePair next;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ public final class WaypointMatcherImpl implements WaypointMatcher {
|
|||
}
|
||||
|
||||
// sort result list
|
||||
comparator = new Comparator<MatchedWaypoint>() {
|
||||
comparator = new Comparator<>() {
|
||||
@Override
|
||||
public int compare(MatchedWaypoint mw1, MatchedWaypoint mw2) {
|
||||
int cmpDist = Double.compare(mw1.radius, mw2.radius);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue