Skip to content

Commit

Permalink
little fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pavel-luhin committed Mar 6, 2020
1 parent fb68a1e commit 36fcc7d
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.pluhin.repostbot.config;

import com.pluhin.repostbot.model.domainid.SourceDomainType;
import com.pluhin.repostbot.service.DefaultGetSourceInfoService;
import com.pluhin.repostbot.service.GetSourceInfoService;
import com.pluhin.repostbot.service.VkGetSourceInfoService;
import com.pluhin.repostbot.service.getsource.DefaultGetSourceInfoService;
import com.pluhin.repostbot.service.getsource.GetSourceInfoService;
import com.pluhin.repostbot.service.getsource.VkGetSourceInfoService;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.pluhin.repostbot.model.PostsSourceDTO;
import com.pluhin.repostbot.model.domainid.SourceDomainId;
import com.pluhin.repostbot.repository.SourcesRepository;
import com.pluhin.repostbot.service.getsource.GetSourceInfoService;
import java.util.List;
import java.util.stream.Collectors;
import org.springframework.stereotype.Service;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.pluhin.repostbot.model.PostDTO;
import com.pluhin.repostbot.model.domainid.SourceDomainId;
import com.pluhin.repostbot.model.domainid.SourceDomainType;
import java.util.EnumMap;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
Expand All @@ -27,7 +28,7 @@ public static Builder builder() {

public static class Builder {

private Map<SourceDomainType, GetPostsService> dictionary = new HashMap<>();
private Map<SourceDomainType, GetPostsService> dictionary = new EnumMap(SourceDomainType.class);

public Builder put(SourceDomainType type, GetPostsService service) {
dictionary.put(type, service);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package com.pluhin.repostbot.service;
package com.pluhin.repostbot.service.getsource;

import com.pluhin.repostbot.model.PostsSourceDTO;
import com.pluhin.repostbot.model.domainid.SourceDomainId;
import com.pluhin.repostbot.model.domainid.SourceDomainType;
import java.util.EnumMap;
import java.util.HashMap;
import java.util.Map;

Expand All @@ -26,7 +27,7 @@ public static Builder builder() {

public static class Builder {

private Map<SourceDomainType, GetSourceInfoService> dictionary = new HashMap<>();
private Map<SourceDomainType, GetSourceInfoService> dictionary = new EnumMap(SourceDomainType.class);

public Builder put(SourceDomainType type, GetSourceInfoService service) {
dictionary.put(type, service);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.pluhin.repostbot.service;
package com.pluhin.repostbot.service.getsource;

import com.pluhin.repostbot.model.PostsSourceDTO;
import com.pluhin.repostbot.model.domainid.SourceDomainId;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.pluhin.repostbot.service;
package com.pluhin.repostbot.service.getsource;

import com.pluhin.repostbot.exception.GetSourceInfoException;
import com.pluhin.repostbot.model.PostsSourceDTO;
Expand Down

0 comments on commit 36fcc7d

Please sign in to comment.