Sonar cleanups 03032019

This commit is contained in:
Ingmar Goudt 2019-03-04 10:43:20 +01:00
parent f46f321635
commit 45f665eb1d
13 changed files with 37 additions and 41 deletions

View file

@ -289,8 +289,9 @@ public final class RateCard {
}
// normalize for the file to [1..100]
for (String name : thisFileRatings.keySet()) {
int r = thisFileRatings.get(name);
for (Map.Entry<String, Integer> ratingByName : thisFileRatings.entrySet()) {
int r = ratingByName.getValue();
String name = ratingByName.getKey();
int newRating = (int) (100.0f * (r - min) / (max - min));
int oldRating = baseRatings.getOrDefault(name, 0);
if (newRating > oldRating) {
@ -339,7 +340,7 @@ public final class RateCard {
}
Integer typeCount = singleCount.get(symbol);
if (typeCount == null) {
typeCount = new Integer(0);
typeCount = 0;
}
typeCount += 1;
singleCount.put(symbol, typeCount);