From e255de122714feaabfa57d2ce90b3b3a5e52f0b1 Mon Sep 17 00:00:00 2001 From: Mark Struchkov Date: Wed, 8 May 2019 13:35:27 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A0=D0=B5=D1=84=D0=B0=D0=BA=D1=82=D0=BE?= =?UTF-8?q?=D1=80=D0=B8=D0=BD=D0=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- .../bot/core/repository/impl/EventRepositoryQueue.java | 2 +- .../bot/core/repository/impl/MailRepositoryList.java | 2 +- .../bot/core/repository/impl/PersonRepositoryMap.java | 2 +- .../repository/impl/TerminalComandRepositoryQueue.java | 2 +- .../org/sadtech/bot/core/service/RawEventService.java | 2 -- .../bot/core/service/impl/RawEventServiceImpl.java | 9 ++------- 7 files changed, 7 insertions(+), 14 deletions(-) diff --git a/pom.xml b/pom.xml index 6b43a82..ab1d601 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ org.sadtech.bot bot-core - 0.5.0-RELEASE + 0.5.1-SNAPHOT jar diff --git a/src/main/java/org/sadtech/bot/core/repository/impl/EventRepositoryQueue.java b/src/main/java/org/sadtech/bot/core/repository/impl/EventRepositoryQueue.java index 8f191b5..ed9ad45 100644 --- a/src/main/java/org/sadtech/bot/core/repository/impl/EventRepositoryQueue.java +++ b/src/main/java/org/sadtech/bot/core/repository/impl/EventRepositoryQueue.java @@ -8,7 +8,7 @@ import java.util.concurrent.ConcurrentLinkedQueue; public class EventRepositoryQueue implements EventRepository { - private Queue jsonObjects = new ConcurrentLinkedQueue<>(); + private final Queue jsonObjects = new ConcurrentLinkedQueue<>(); @Override public void add(JsonObject jsonObject) { diff --git a/src/main/java/org/sadtech/bot/core/repository/impl/MailRepositoryList.java b/src/main/java/org/sadtech/bot/core/repository/impl/MailRepositoryList.java index dc753f2..6012f54 100644 --- a/src/main/java/org/sadtech/bot/core/repository/impl/MailRepositoryList.java +++ b/src/main/java/org/sadtech/bot/core/repository/impl/MailRepositoryList.java @@ -11,7 +11,7 @@ import java.util.concurrent.ConcurrentLinkedQueue; public class MailRepositoryList implements EventRepository, MailRepository { - private List messages = new ArrayList<>(); + private final List messages = new ArrayList<>(); @Override public void add(Mail mail) { diff --git a/src/main/java/org/sadtech/bot/core/repository/impl/PersonRepositoryMap.java b/src/main/java/org/sadtech/bot/core/repository/impl/PersonRepositoryMap.java index ba212f1..905befb 100644 --- a/src/main/java/org/sadtech/bot/core/repository/impl/PersonRepositoryMap.java +++ b/src/main/java/org/sadtech/bot/core/repository/impl/PersonRepositoryMap.java @@ -11,7 +11,7 @@ import java.util.concurrent.ConcurrentLinkedQueue; public class PersonRepositoryMap implements EventRepository, PersonRepository { - private Map personMap = new HashMap<>(); + private final Map personMap = new HashMap<>(); @Override public void add(Person person) { diff --git a/src/main/java/org/sadtech/bot/core/repository/impl/TerminalComandRepositoryQueue.java b/src/main/java/org/sadtech/bot/core/repository/impl/TerminalComandRepositoryQueue.java index 24cc99a..3e6b681 100644 --- a/src/main/java/org/sadtech/bot/core/repository/impl/TerminalComandRepositoryQueue.java +++ b/src/main/java/org/sadtech/bot/core/repository/impl/TerminalComandRepositoryQueue.java @@ -8,7 +8,7 @@ import java.util.concurrent.ConcurrentLinkedQueue; public class TerminalComandRepositoryQueue implements EventRepository { - private Queue mailQueue = new ConcurrentLinkedQueue<>(); + private final Queue mailQueue = new ConcurrentLinkedQueue<>(); @Override public void add(Mail dataObject) { diff --git a/src/main/java/org/sadtech/bot/core/service/RawEventService.java b/src/main/java/org/sadtech/bot/core/service/RawEventService.java index f627bbd..46e43f3 100644 --- a/src/main/java/org/sadtech/bot/core/service/RawEventService.java +++ b/src/main/java/org/sadtech/bot/core/service/RawEventService.java @@ -15,6 +15,4 @@ public interface RawEventService { EventRepository getEventRepository(); - void replacementEventRepository(EventRepository eventRepository); - } \ No newline at end of file diff --git a/src/main/java/org/sadtech/bot/core/service/impl/RawEventServiceImpl.java b/src/main/java/org/sadtech/bot/core/service/impl/RawEventServiceImpl.java index f67ea02..7232f89 100644 --- a/src/main/java/org/sadtech/bot/core/service/impl/RawEventServiceImpl.java +++ b/src/main/java/org/sadtech/bot/core/service/impl/RawEventServiceImpl.java @@ -9,9 +9,9 @@ import java.util.Queue; public class RawEventServiceImpl implements RawEventService { - public static final Logger log = Logger.getLogger(RawEventServiceImpl.class); + private static final Logger log = Logger.getLogger(RawEventServiceImpl.class); - private EventRepository eventRepository; + private final EventRepository eventRepository; public RawEventServiceImpl(EventRepository eventRepository) { this.eventRepository = eventRepository; @@ -39,9 +39,4 @@ public class RawEventServiceImpl implements RawEventService { return eventRepository; } - @Override - public void replacementEventRepository(EventRepository eventRepository) { - this.eventRepository = eventRepository; - } - }