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
|
|
@ -287,7 +287,7 @@ public final class MicroCache2 extends MicroCache {
|
|||
|
||||
@Override
|
||||
public int encodeMicroCache(byte[] buffer) {
|
||||
HashMap<Long, Integer> idMap = new HashMap<Long, Integer>();
|
||||
HashMap<Long, Integer> idMap = new HashMap<>();
|
||||
for (int n = 0; n < size; n++) { // loop over nodes
|
||||
idMap.put(Long.valueOf(expandId(faid[n])), Integer.valueOf(n));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ public final class StatCoderContext extends BitCoderContext {
|
|||
public void assignBits(String name) {
|
||||
long bitpos = getWritingBitPosition();
|
||||
if (statsPerName == null) {
|
||||
statsPerName = new TreeMap<String, long[]>();
|
||||
statsPerName = new TreeMap<>();
|
||||
}
|
||||
long[] stats = statsPerName.get(name);
|
||||
if (stats == null) {
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ public final class TagValueCoder {
|
|||
TagValueSet dummy = new TagValueSet(nextTagValueSetId++);
|
||||
identityMap.put(dummy, dummy);
|
||||
}
|
||||
PriorityQueue<TagValueSet> queue = new PriorityQueue<TagValueSet>(2 * identityMap.size(), new TagValueSet.FrequencyComparator());
|
||||
PriorityQueue<TagValueSet> queue = new PriorityQueue<>(2 * identityMap.size(), new TagValueSet.FrequencyComparator());
|
||||
queue.addAll(identityMap.values());
|
||||
while (queue.size() > 1) {
|
||||
TagValueSet node = new TagValueSet(nextTagValueSetId++);
|
||||
|
|
@ -79,7 +79,7 @@ public final class TagValueCoder {
|
|||
}
|
||||
|
||||
public TagValueCoder() {
|
||||
identityMap = new HashMap<TagValueSet, TagValueSet>();
|
||||
identityMap = new HashMap<>();
|
||||
}
|
||||
|
||||
private Object decodeTree(BitCoderContext bc, DataBuffers buffers, TagValueValidator validator) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue