mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-03-01 18:00:48 +01:00
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:
@@ -65,10 +65,10 @@ class InvalidFormatExceptionMapperTest {
|
||||
}
|
||||
|
||||
static class ObjectWithEnum {
|
||||
public Enum e;
|
||||
public TestEnum e;
|
||||
}
|
||||
|
||||
enum Enum {
|
||||
enum TestEnum {
|
||||
ONE, TWO
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user