From a2b2f4ece546915802e5846584125cf083acc619 Mon Sep 17 00:00:00 2001 From: Sergey Akkuratov Date: Sat, 9 Mar 2024 14:17:15 +0300 Subject: [PATCH] Fix some warnings. --- .../ru/sakkuratov/autotests/events/StartCleanEvent.java | 9 --------- .../sakkuratov/autotests/events/TestFinishedEvent.java | 5 ++--- .../ru/sakkuratov/autotests/services/TestWatcher.java | 2 +- 3 files changed, 3 insertions(+), 13 deletions(-) delete mode 100644 src/main/java/ru/sakkuratov/autotests/events/StartCleanEvent.java diff --git a/src/main/java/ru/sakkuratov/autotests/events/StartCleanEvent.java b/src/main/java/ru/sakkuratov/autotests/events/StartCleanEvent.java deleted file mode 100644 index f2261a4..0000000 --- a/src/main/java/ru/sakkuratov/autotests/events/StartCleanEvent.java +++ /dev/null @@ -1,9 +0,0 @@ -package ru.sakkuratov.autotests.events; - -import org.springframework.context.ApplicationEvent; - -public class StartCleanEvent extends ApplicationEvent { - public StartCleanEvent(Object source) { - super(source); - } -} diff --git a/src/main/java/ru/sakkuratov/autotests/events/TestFinishedEvent.java b/src/main/java/ru/sakkuratov/autotests/events/TestFinishedEvent.java index 4841735..d615c51 100644 --- a/src/main/java/ru/sakkuratov/autotests/events/TestFinishedEvent.java +++ b/src/main/java/ru/sakkuratov/autotests/events/TestFinishedEvent.java @@ -1,10 +1,12 @@ package ru.sakkuratov.autotests.events; +import lombok.Getter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.context.ApplicationEvent; import ru.sakkuratov.autotests.models.CucumberTask; +@Getter public class TestFinishedEvent extends ApplicationEvent { private static final Logger logger = LoggerFactory.getLogger(TestFinishedEvent.class); @@ -16,7 +18,4 @@ public TestFinishedEvent(CucumberTask source, String resultMessage) { logger.debug("Event created: Test finished event"); } - public String getResultMessage() { - return this.resultMessage; - } } diff --git a/src/main/java/ru/sakkuratov/autotests/services/TestWatcher.java b/src/main/java/ru/sakkuratov/autotests/services/TestWatcher.java index e5303af..9918b7f 100644 --- a/src/main/java/ru/sakkuratov/autotests/services/TestWatcher.java +++ b/src/main/java/ru/sakkuratov/autotests/services/TestWatcher.java @@ -19,7 +19,7 @@ public class TestWatcher { @Autowired private ApplicationEventPublisher publisher; - private HttpHeaders headers = new HttpHeaders(); + private final HttpHeaders headers = new HttpHeaders(); @PostConstruct public void init() {