Reduce code smells (#2089)

Reduce code smells found by deepsource.io. We focused on the low-hanging fruits and not breaking any api.
This commit is contained in:
Eduard Heimbuch
2022-07-15 15:33:37 +02:00
committed by GitHub
parent f61d0c113f
commit 67c083ee54
15 changed files with 149 additions and 443 deletions

View File

@@ -65,10 +65,10 @@ class InvalidFormatExceptionMapperTest {
}
static class ObjectWithEnum {
public Enum e;
public TestEnum e;
}
enum Enum {
enum TestEnum {
ONE, TWO
}
}

View File

@@ -162,7 +162,7 @@ public class DefaultRepositoryManagerPerfTest {
private long calculateAverage(List<Long> times) {
Long sum = 0L;
if(!times.isEmpty()) {
for (Long time : times) {
for (long time : times) {
sum += time;
}
return Math.round(sum.doubleValue() / times.size());