Рефакторинг
This commit is contained in:
parent
387e091efd
commit
e255de1227
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>org.sadtech.bot</groupId>
|
||||
<artifactId>bot-core</artifactId>
|
||||
<version>0.5.0-RELEASE</version>
|
||||
<version>0.5.1-SNAPHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<build>
|
||||
|
@ -8,7 +8,7 @@ import java.util.concurrent.ConcurrentLinkedQueue;
|
||||
|
||||
public class EventRepositoryQueue implements EventRepository<JsonObject> {
|
||||
|
||||
private Queue<JsonObject> jsonObjects = new ConcurrentLinkedQueue<>();
|
||||
private final Queue<JsonObject> jsonObjects = new ConcurrentLinkedQueue<>();
|
||||
|
||||
@Override
|
||||
public void add(JsonObject jsonObject) {
|
||||
|
@ -11,7 +11,7 @@ import java.util.concurrent.ConcurrentLinkedQueue;
|
||||
|
||||
public class MailRepositoryList implements EventRepository<Mail>, MailRepository {
|
||||
|
||||
private List<Mail> messages = new ArrayList<>();
|
||||
private final List<Mail> messages = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
public void add(Mail mail) {
|
||||
|
@ -11,7 +11,7 @@ import java.util.concurrent.ConcurrentLinkedQueue;
|
||||
|
||||
public class PersonRepositoryMap implements EventRepository<Person>, PersonRepository {
|
||||
|
||||
private Map<Integer, Person> personMap = new HashMap<>();
|
||||
private final Map<Integer, Person> personMap = new HashMap<>();
|
||||
|
||||
@Override
|
||||
public void add(Person person) {
|
||||
|
@ -8,7 +8,7 @@ import java.util.concurrent.ConcurrentLinkedQueue;
|
||||
|
||||
public class TerminalComandRepositoryQueue implements EventRepository<Mail> {
|
||||
|
||||
private Queue<Mail> mailQueue = new ConcurrentLinkedQueue<>();
|
||||
private final Queue<Mail> mailQueue = new ConcurrentLinkedQueue<>();
|
||||
|
||||
@Override
|
||||
public void add(Mail dataObject) {
|
||||
|
@ -15,6 +15,4 @@ public interface RawEventService {
|
||||
|
||||
EventRepository getEventRepository();
|
||||
|
||||
void replacementEventRepository(EventRepository eventRepository);
|
||||
|
||||
}
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user