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
|
|
@ -1,6 +1,7 @@
|
|||
package btools.codec;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import btools.util.ByteDataReader;
|
||||
import btools.util.IByteArrayUnifier;
|
||||
|
|
@ -287,7 +288,7 @@ public final class MicroCache2 extends MicroCache {
|
|||
|
||||
@Override
|
||||
public int encodeMicroCache(byte[] buffer) {
|
||||
HashMap<Long, Integer> idMap = new HashMap<>();
|
||||
Map<Long, Integer> idMap = new HashMap<>();
|
||||
for (int n = 0; n < size; n++) { // loop over nodes
|
||||
idMap.put(expandId(faid[n]), n);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import java.util.Comparator;
|
|||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.PriorityQueue;
|
||||
import java.util.Queue;
|
||||
|
||||
import btools.util.BitCoderContext;
|
||||
|
||||
|
|
@ -58,7 +59,7 @@ public final class TagValueCoder {
|
|||
TagValueSet dummy = new TagValueSet(nextTagValueSetId++);
|
||||
identityMap.put(dummy, dummy);
|
||||
}
|
||||
PriorityQueue<TagValueSet> queue = new PriorityQueue<>(2 * identityMap.size(), new TagValueSet.FrequencyComparator());
|
||||
Queue<TagValueSet> queue = new PriorityQueue<>(2 * identityMap.size(), new TagValueSet.FrequencyComparator());
|
||||
queue.addAll(identityMap.values());
|
||||
while (queue.size() > 1) {
|
||||
TagValueSet node = new TagValueSet(nextTagValueSetId++);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue