Enable PMD rule UseDiamondOperator and fix violations
This commit is contained in:
parent
2e1722150c
commit
7a6d3bd9d9
45 changed files with 105 additions and 105 deletions
|
|
@ -108,7 +108,7 @@ public class WayLinker extends MapCreatorBase implements Runnable {
|
|||
private void reset() {
|
||||
minLon = -1;
|
||||
minLat = -1;
|
||||
nodesMap = new CompactLongMap<OsmNodeP>();
|
||||
nodesMap = new CompactLongMap<>();
|
||||
borderSet = new CompactLongSet();
|
||||
}
|
||||
|
||||
|
|
@ -231,7 +231,7 @@ public class WayLinker extends MapCreatorBase implements Runnable {
|
|||
new NodeIterator(this, true).processFile(nodeFile);
|
||||
|
||||
// freeze the nodes-map
|
||||
FrozenLongMap<OsmNodeP> nodesMapFrozen = new FrozenLongMap<OsmNodeP>(nodesMap);
|
||||
FrozenLongMap<OsmNodeP> nodesMapFrozen = new FrozenLongMap<>(nodesMap);
|
||||
nodesMap = nodesMapFrozen;
|
||||
|
||||
File restrictionFile = fileFromTemplate(wayfile, new File(nodeTilesIn.getParentFile(), "restrictions55"), "rt5");
|
||||
|
|
@ -415,7 +415,7 @@ public class WayLinker extends MapCreatorBase implements Runnable {
|
|||
int nLatSegs = (maxLat - minLat) / 1000000;
|
||||
|
||||
// sort the nodes into segments
|
||||
LazyArrayOfLists<OsmNodeP> seglists = new LazyArrayOfLists<OsmNodeP>(nLonSegs * nLatSegs);
|
||||
LazyArrayOfLists<OsmNodeP> seglists = new LazyArrayOfLists<>(nLonSegs * nLatSegs);
|
||||
for (OsmNodeP n : nodesList) {
|
||||
if (n == null || n.getFirstLink() == null || n.isTransferNode())
|
||||
continue;
|
||||
|
|
@ -450,7 +450,7 @@ public class WayLinker extends MapCreatorBase implements Runnable {
|
|||
if (seglists.getSize(tileIndex) > 0) {
|
||||
List<OsmNodeP> nlist = seglists.getList(tileIndex);
|
||||
|
||||
LazyArrayOfLists<OsmNodeP> subs = new LazyArrayOfLists<OsmNodeP>(ncaches);
|
||||
LazyArrayOfLists<OsmNodeP> subs = new LazyArrayOfLists<>(ncaches);
|
||||
byte[][] subByteArrays = new byte[ncaches][];
|
||||
for (int ni = 0; ni < nlist.size(); ni++) {
|
||||
OsmNodeP n = nlist.get(ni);
|
||||
|
|
@ -473,7 +473,7 @@ public class WayLinker extends MapCreatorBase implements Runnable {
|
|||
MicroCache mc = new MicroCache2(size, abBuf2, lonIdxDiv, latIdxDiv, divisor);
|
||||
|
||||
// sort via treemap
|
||||
TreeMap<Integer, OsmNodeP> sortedList = new TreeMap<Integer, OsmNodeP>();
|
||||
TreeMap<Integer, OsmNodeP> sortedList = new TreeMap<>();
|
||||
for (OsmNodeP n : subList) {
|
||||
long longId = n.getIdFromPos();
|
||||
int shrinkid = mc.shrinkId(longId);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue