File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
src/main/java/com/sprint/mission/discodeit Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 4
4
import java .util .Arrays ;
5
5
import java .util .List ;
6
6
7
- public class ChannelDefaultRepository {
7
+ public class DefaultChannelFactory {
8
8
public static List <Channel > getChannel () {
9
9
return Arrays .asList (
10
10
new Channel ("코드잇 스프린트:스프링 백엔드 3기" ),
Original file line number Diff line number Diff line change 1
1
package com .sprint .mission .discodeit .repository .file ;
2
2
3
3
import com .sprint .mission .discodeit .entity .Channel ;
4
- import com .sprint .mission .discodeit .repository .ChannelDefaultRepository ;
5
4
import com .sprint .mission .discodeit .repository .ChannelRepository ;
5
+ import com .sprint .mission .discodeit .repository .DefaultChannelFactory ;
6
6
import java .io .File ;
7
7
import java .io .FileInputStream ;
8
8
import java .io .FileOutputStream ;
@@ -21,7 +21,7 @@ public FileChannelRepository() {
21
21
channelMap = loadChannels ();
22
22
if (channelMap == null || channelMap .isEmpty ()) {
23
23
channelMap = new HashMap <>();
24
- for (Channel ch : ChannelDefaultRepository .getChannel ()) {
24
+ for (Channel ch : DefaultChannelFactory .getChannel ()) {
25
25
channelMap .put (ch .getChannelNumber (), ch );
26
26
}
27
27
saveChannels ();
Original file line number Diff line number Diff line change 1
1
package com .sprint .mission .discodeit .service .file ;
2
2
3
3
import com .sprint .mission .discodeit .entity .Channel ;
4
- import com .sprint .mission .discodeit .repository .ChannelDefaultRepository ;
4
+ import com .sprint .mission .discodeit .repository .DefaultChannelFactory ;
5
5
import com .sprint .mission .discodeit .service .ChannelService ;
6
6
import java .io .File ;
7
7
import java .io .FileInputStream ;
@@ -24,7 +24,7 @@ public FileChannelService() {
24
24
25
25
if (channelMap == null || channelMap .isEmpty ()) {
26
26
channelMap = new HashMap <>();
27
- List <Channel > defaultChannels = ChannelDefaultRepository .getChannel ();
27
+ List <Channel > defaultChannels = DefaultChannelFactory .getChannel ();
28
28
for (Channel channel : defaultChannels ) {
29
29
channelMap .put (channel .getChannelNumber (), channel );
30
30
}
You can’t perform that action at this time.
0 commit comments