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
|
|
@ -36,10 +36,10 @@ public abstract class BExpressionContext implements IByteArrayUnifier {
|
|||
|
||||
public String _modelClass;
|
||||
|
||||
private Map<String, Integer> lookupNumbers = new HashMap<String, Integer>();
|
||||
private List<BExpressionLookupValue[]> lookupValues = new ArrayList<BExpressionLookupValue[]>();
|
||||
private List<String> lookupNames = new ArrayList<String>();
|
||||
private List<int[]> lookupHistograms = new ArrayList<int[]>();
|
||||
private Map<String, Integer> lookupNumbers = new HashMap<>();
|
||||
private List<BExpressionLookupValue[]> lookupValues = new ArrayList<>();
|
||||
private List<String> lookupNames = new ArrayList<>();
|
||||
private List<int[]> lookupHistograms = new ArrayList<>();
|
||||
private boolean[] lookupIdxUsed;
|
||||
|
||||
private boolean lookupDataFrozen = false;
|
||||
|
|
@ -50,7 +50,7 @@ public abstract class BExpressionContext implements IByteArrayUnifier {
|
|||
private BitCoderContext ctxEndode = new BitCoderContext(abBuf);
|
||||
private BitCoderContext ctxDecode = new BitCoderContext(new byte[0]);
|
||||
|
||||
private Map<String, Integer> variableNumbers = new HashMap<String, Integer>();
|
||||
private Map<String, Integer> variableNumbers = new HashMap<>();
|
||||
|
||||
private float[] variableData;
|
||||
|
||||
|
|
@ -223,7 +223,7 @@ public abstract class BExpressionContext implements IByteArrayUnifier {
|
|||
}
|
||||
|
||||
public List<String> getKeyValueList(boolean inverseDirection, byte[] ab) {
|
||||
ArrayList<String> res = new ArrayList<String>();
|
||||
ArrayList<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);
|
||||
|
|
@ -429,7 +429,7 @@ public abstract class BExpressionContext implements IByteArrayUnifier {
|
|||
|
||||
|
||||
public void dumpStatistics() {
|
||||
TreeMap<String, String> counts = new TreeMap<String, String>();
|
||||
TreeMap<String, String> counts = new TreeMap<>();
|
||||
// first count
|
||||
for (String name : lookupNumbers.keySet()) {
|
||||
int cnt = 0;
|
||||
|
|
@ -815,7 +815,7 @@ public abstract class BExpressionContext implements IByteArrayUnifier {
|
|||
private List<BExpression> _parseFile(File file) throws Exception {
|
||||
_br = new BufferedReader(new FileReader(file));
|
||||
_readerDone = false;
|
||||
List<BExpression> result = new ArrayList<BExpression>();
|
||||
List<BExpression> result = new ArrayList<>();
|
||||
for (; ; ) {
|
||||
BExpression exp = BExpression.parse(this, 0);
|
||||
if (exp == null) break;
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ final class BExpressionLookupValue {
|
|||
}
|
||||
|
||||
public void addAlias(String alias) {
|
||||
if (aliases == null) aliases = new ArrayList<String>();
|
||||
if (aliases == null) aliases = new ArrayList<>();
|
||||
aliases.add(alias);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ public final class BExpressionMetaData {
|
|||
public short lookupMinorVersion = -1;
|
||||
public short minAppVersion = -1;
|
||||
|
||||
private Map<String, BExpressionContext> listeners = new HashMap<String, BExpressionContext>();
|
||||
private Map<String, BExpressionContext> listeners = new HashMap<>();
|
||||
|
||||
public void registerListener(String context, BExpressionContext ctx) {
|
||||
listeners.put(context, ctx);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue