Переглянути джерело

Remove unused field.

pull/573/head
Chris Smith 9 роки тому
джерело
коміт
ed7bdd0154

+ 0
- 8
src/com/dmdirc/ServerManager.java Переглянути файл

@@ -22,12 +22,10 @@
22 22
 
23 23
 package com.dmdirc;
24 24
 
25
-import com.dmdirc.commandparser.parsers.ServerCommandParser;
26 25
 import com.dmdirc.config.profiles.Profile;
27 26
 import com.dmdirc.config.profiles.ProfileManager;
28 27
 import com.dmdirc.events.FrameClosingEvent;
29 28
 import com.dmdirc.events.UserErrorEvent;
30
-import com.dmdirc.interfaces.CommandController;
31 29
 import com.dmdirc.interfaces.Connection;
32 30
 import com.dmdirc.interfaces.ConnectionManager;
33 31
 import com.dmdirc.interfaces.config.ConfigProviderMigrator;
@@ -49,7 +47,6 @@ import java.util.concurrent.Executors;
49 47
 import java.util.stream.Collectors;
50 48
 
51 49
 import javax.inject.Inject;
52
-import javax.inject.Provider;
53 50
 import javax.inject.Singleton;
54 51
 
55 52
 import net.engio.mbassy.listener.Handler;
@@ -65,8 +62,6 @@ public class ServerManager implements ConnectionManager {
65 62
     private final Set<Server> servers = new CopyOnWriteArraySet<>();
66 63
     /** The manager to use to find profiles. */
67 64
     private final ProfileManager profileManager;
68
-    /** A provider of {@link CommandController}s to pass to servers. */
69
-    private final Provider<CommandController> commandController;
70 65
     /** The identity factory to give to servers. */
71 66
     private final IdentityFactory identityFactory;
72 67
     /** Window manager to add new servers to. */
@@ -81,7 +76,6 @@ public class ServerManager implements ConnectionManager {
81 76
      *
82 77
      * @param profileManager     The manager to use to find profiles.
83 78
      * @param identityFactory    The factory to use to create new identities.
84
-     * @param commandController  A provider of {@link CommandController}s to pass to servers.
85 79
      * @param windowManager      Window manager to add new servers to.
86 80
      * @param serverFactory      The factory to use to create servers.
87 81
      * @param eventBus           The event bus to pass to servers.
@@ -90,13 +84,11 @@ public class ServerManager implements ConnectionManager {
90 84
     public ServerManager(
91 85
             final ProfileManager profileManager,
92 86
             final IdentityFactory identityFactory,
93
-            final Provider<CommandController> commandController,
94 87
             final WindowManager windowManager,
95 88
             final ServerFactoryImpl serverFactory,
96 89
             final DMDircMBassador eventBus) {
97 90
         this.profileManager = profileManager;
98 91
         this.identityFactory = identityFactory;
99
-        this.commandController = commandController;
100 92
         this.windowManager = windowManager;
101 93
         this.serverFactoryImpl = serverFactory;
102 94
         this.eventBus = eventBus;

+ 1
- 8
test/com/dmdirc/ServerManagerTest.java Переглянути файл

@@ -24,7 +24,6 @@ package com.dmdirc;
24 24
 
25 25
 import com.dmdirc.config.profiles.Profile;
26 26
 import com.dmdirc.config.profiles.ProfileManager;
27
-import com.dmdirc.interfaces.CommandController;
28 27
 import com.dmdirc.interfaces.GroupChatManager;
29 28
 import com.dmdirc.interfaces.config.AggregateConfigProvider;
30 29
 import com.dmdirc.interfaces.config.ConfigProviderMigrator;
@@ -37,8 +36,6 @@ import java.util.Collections;
37 36
 import java.util.Optional;
38 37
 import java.util.concurrent.ScheduledExecutorService;
39 38
 
40
-import javax.inject.Provider;
41
-
42 39
 import org.junit.Before;
43 40
 import org.junit.Test;
44 41
 import org.junit.runner.RunWith;
@@ -63,8 +60,6 @@ public class ServerManagerTest {
63 60
     @Mock private ConfigProviderMigrator configProviderMigrator;
64 61
     @Mock private Profile profile;
65 62
     @Mock private AggregateConfigProvider configProvider;
66
-    @Mock private Provider<CommandController> commandControllerProvider;
67
-    @Mock private CommandController commandController;
68 63
     @Mock private WindowManager windowManager;
69 64
     @Mock private ServerFactoryImpl serverFactoryImpl;
70 65
     @Mock private Server server;
@@ -78,12 +73,10 @@ public class ServerManagerTest {
78 73
 
79 74
     @Before
80 75
     public void setUp() throws Exception {
81
-        serverManager = new ServerManager(profileManager, identityFactory,
82
-                commandControllerProvider, windowManager, serverFactoryImpl, eventBus);
76
+        serverManager = new ServerManager(profileManager, identityFactory, windowManager, serverFactoryImpl, eventBus);
83 77
 
84 78
         when(server.getState()).thenReturn(ServerState.DISCONNECTED);
85 79
         when(server.getGroupChatManager()).thenReturn(groupChatManager);
86
-        when(commandControllerProvider.get()).thenReturn(commandController);
87 80
 
88 81
         when(profileManager.getProfiles()).thenReturn(Collections.singletonList(profile));
89 82
         when(profileManager.getDefault()).thenReturn(profile);

Завантаження…
Відмінити
Зберегти