Fix newly detected violations from PMD 7

This commit is contained in:
Manuel Fuhr 2024-04-03 14:41:06 +02:00
parent 2f7ce42480
commit dd896347a2
28 changed files with 65 additions and 57 deletions

View file

@ -31,7 +31,7 @@ public class IpAccessMonitor {
}
private static void cleanup(long t) {
HashMap<String, Long> newMap = new HashMap<>(ipAccess.size());
Map<String, Long> newMap = new HashMap<>(ipAccess.size());
for (Map.Entry<String, Long> e : ipAccess.entrySet()) {
if (t - e.getValue().longValue() <= MAX_IDLE) {
newMap.put(e.getKey(), e.getValue());