Skip to content

Commit 3dc180e

Browse files
committed
Add unidev-logger
1 parent b1f7ddd commit 3dc180e

File tree

6 files changed

+9
-7
lines changed

6 files changed

+9
-7
lines changed

settings.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ include (
77
"unidev-dto",
88
"unidev-exception",
99
"unidev-encryption",
10+
"unidev-logger",
1011
)

unidev-common/src/main/java/com/unidev/platform/ExecutorServiceManager.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
*/
1212
public class ExecutorServiceManager {
1313

14-
private ExecutorService executorService;
14+
private final ExecutorService executorService;
1515

16-
private Collection<Future<?>> submittedJobs = new ConcurrentLinkedQueue<>();
16+
private final Collection<Future<?>> submittedJobs = new ConcurrentLinkedQueue<>();
1717

1818
public ExecutorServiceManager(ExecutorService executorService) {
1919
this.executorService = executorService;

unidev-common/src/main/java/com/unidev/platform/Processes.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public String runProcess(ProcessToRun processToRun) {
3939
try {
4040
executor.execute(commandLine);
4141
} catch (IOException e) {
42-
log.warn("Execution of {} failed {}", processToRun, outputStream.toString(), e);
42+
log.warn("Execution of {} failed {}", processToRun, outputStream, e);
4343
throw new UnidevRuntimeException(e);
4444
}
4545

unidev-common/src/main/java/com/unidev/platform/StatisticsManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
public class StatisticsManager {
1010

1111
@Getter
12-
private Map<String, StatItem> statistics = new ConcurrentHashMap<>();
12+
private final Map<String, StatItem> statistics = new ConcurrentHashMap<>();
1313

1414
public void add(String key) {
1515
add(key, 1L);

unidev-common/src/test/java/com/unidev/platform/FixedThreadManagerTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
public class FixedThreadManagerTest {
88

9-
private AtomicInteger startCount = new AtomicInteger(0);
10-
private AtomicInteger stopCount = new AtomicInteger(0);
9+
private final AtomicInteger startCount = new AtomicInteger(0);
10+
private final AtomicInteger stopCount = new AtomicInteger(0);
1111

1212
@Test
1313
public void testScheduling() throws InterruptedException {

unidev-common/src/test/java/com/unidev/platform/RandomsTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import org.junit.jupiter.api.Test;
55

66
import java.util.Arrays;
7+
import java.util.List;
78
import java.util.Random;
89

910
import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
@@ -19,7 +20,7 @@ void init() {
1920

2021
@Test
2122
void testOneElementSelection() {
22-
String value = randoms.randomValue(Arrays.asList("potato"));
23+
String value = randoms.randomValue(List.of("potato"));
2324
assertThat(value).isNotNull();
2425
assertThat(value).isEqualTo("potato");
2526

0 commit comments

Comments
 (0)