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
|
|
@ -242,15 +242,15 @@ final class BExpression {
|
|||
}
|
||||
// parse operands
|
||||
if (nops > 0) {
|
||||
exp.op1 = BExpression.parse(ctx, level + 1, exp.typ == ASSIGN_EXP ? "=" : null);
|
||||
exp.op1 = parse(ctx, level + 1, exp.typ == ASSIGN_EXP ? "=" : null);
|
||||
}
|
||||
if (nops > 1) {
|
||||
if (ifThenElse) checkExpectedToken(ctx, "then");
|
||||
exp.op2 = BExpression.parse(ctx, level + 1, null);
|
||||
exp.op2 = parse(ctx, level + 1, null);
|
||||
}
|
||||
if (nops > 2) {
|
||||
if (ifThenElse) checkExpectedToken(ctx, "else");
|
||||
exp.op3 = BExpression.parse(ctx, level + 1, null);
|
||||
exp.op3 = parse(ctx, level + 1, null);
|
||||
}
|
||||
if (brackets) {
|
||||
checkExpectedToken(ctx, ")");
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ import java.util.Arrays;
|
|||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.NavigableMap;
|
||||
import java.util.Random;
|
||||
import java.util.StringTokenizer;
|
||||
import java.util.TreeMap;
|
||||
|
|
@ -227,7 +228,7 @@ public abstract class BExpressionContext implements IByteArrayUnifier {
|
|||
}
|
||||
|
||||
public List<String> getKeyValueList(boolean inverseDirection, byte[] ab) {
|
||||
ArrayList<String> res = new ArrayList<>();
|
||||
List<String> res = new ArrayList<>();
|
||||
decode(lookupData, inverseDirection, ab);
|
||||
for (int inum = 0; inum < lookupValues.size(); inum++) { // loop over lookup names
|
||||
BExpressionLookupValue[] va = lookupValues.get(inum);
|
||||
|
|
@ -433,7 +434,7 @@ public abstract class BExpressionContext implements IByteArrayUnifier {
|
|||
|
||||
|
||||
public void dumpStatistics() {
|
||||
TreeMap<String, String> counts = new TreeMap<>();
|
||||
NavigableMap<String, String> counts = new TreeMap<>();
|
||||
// first count
|
||||
for (String name : lookupNumbers.keySet()) {
|
||||
int cnt = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue