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
|
|
@ -95,7 +95,7 @@ public final class NodesCache {
|
|||
fileRows = new OsmFile[180][];
|
||||
}
|
||||
} else {
|
||||
fileCache = new HashMap<String, PhysicalFile>(4);
|
||||
fileCache = new HashMap<>(4);
|
||||
fileRows = new OsmFile[180][];
|
||||
dataBuffers = new DataBuffers();
|
||||
secondarySegmentsDir = StorageConfigHelper.getSecondarySegmentDir(segmentDir);
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ public class OsmNodePairSet {
|
|||
|
||||
private void addPair(long n1, long n2) {
|
||||
if (map == null) {
|
||||
map = new CompactLongMap<OsmNodePair>();
|
||||
map = new CompactLongMap<>();
|
||||
}
|
||||
npairs++;
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import java.util.Map;
|
|||
import btools.util.ByteArrayUnifier;
|
||||
|
||||
public final class OsmNodesMap {
|
||||
private Map<OsmNode, OsmNode> hmap = new HashMap<OsmNode, OsmNode>(4096);
|
||||
private Map<OsmNode, OsmNode> hmap = new HashMap<>(4096);
|
||||
|
||||
private ByteArrayUnifier abUnifier = new ByteArrayUnifier(16384, false);
|
||||
|
||||
|
|
@ -176,7 +176,7 @@ public final class OsmNodesMap {
|
|||
}
|
||||
|
||||
public void collectOutreachers() {
|
||||
nodes2check = new ArrayList<OsmNode>(nodesCreated);
|
||||
nodes2check = new ArrayList<>(nodesCreated);
|
||||
nodesCreated = 0;
|
||||
for (OsmNode n : hmap.values()) {
|
||||
addActiveNode(nodes2check, n);
|
||||
|
|
|
|||
|
|
@ -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