Pārlūkot izejas kodu

Remove some dead code.

Change-Id: Ib3f12415ce518c7f2c735667c8a00a3970e75ad3
Reviewed-on: http://gerrit.dmdirc.com/2903
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Automatic-Compile: DMDirc Build Manager
tags/0.8rc1
Chris Smith 10 gadus atpakaļ
vecāks
revīzija
ecbc8cb4a3

+ 0
- 1
src/com/dmdirc/Invite.java Parādīt failu

@@ -33,7 +33,6 @@ import lombok.Getter;
33 33
 public class Invite {
34 34
 
35 35
     /** The server this invite was on. */
36
-    @Getter
37 36
     private final Server server;
38 37
 
39 38
     /** The channel this invite is for. */

+ 0
- 7
src/com/dmdirc/Server.java Parādīt failu

@@ -27,7 +27,6 @@ import com.dmdirc.actions.CoreActionType;
27 27
 import com.dmdirc.commandparser.CommandType;
28 28
 import com.dmdirc.commandparser.parsers.CommandParser;
29 29
 import com.dmdirc.interfaces.AwayStateListener;
30
-import com.dmdirc.interfaces.CommandController;
31 30
 import com.dmdirc.interfaces.Connection;
32 31
 import com.dmdirc.interfaces.InviteListener;
33 32
 import com.dmdirc.interfaces.config.ConfigChangeListener;
@@ -608,12 +607,6 @@ public class Server extends WritableFrameContainer implements ConfigChangeListen
608 607
         }
609 608
     }
610 609
 
611
-    /** {@inheritDoc} */
612
-    @Override
613
-    public Raw getRaw() {
614
-        return raw;
615
-    }
616
-
617 610
     /** {@inheritDoc} */
618 611
     @Override
619 612
     public void delRaw() {

+ 0
- 18
src/com/dmdirc/ServerManager.java Parādīt failu

@@ -197,24 +197,6 @@ public class ServerManager implements ServerFactory {
197 197
         return res;
198 198
     }
199 199
 
200
-    /**
201
-     * Retrieves a list of servers connected to the specified address.
202
-     *
203
-     * @param address The address to search for
204
-     * @return A list of servers connected to the network
205
-     */
206
-    public List<Server> getServersByAddress(final String address) {
207
-        final List<Server> res = new ArrayList<>();
208
-
209
-        for (Server server : servers) {
210
-            if (server.getAddress().equalsIgnoreCase(address)) {
211
-                res.add(server);
212
-            }
213
-        }
214
-
215
-        return res;
216
-    }
217
-
218 200
     /**
219 201
      * Creates a new server which will connect to the specified URI with the
220 202
      * default profile.

+ 0
- 29
src/com/dmdirc/actions/ActionGroup.java Parādīt failu

@@ -170,15 +170,6 @@ public class ActionGroup implements Iterable<Action> {
170 170
         this.component = component;
171 171
     }
172 172
 
173
-    /**
174
-     * Determines the size of this group.
175
-     *
176
-     * @return The size of this group
177
-     */
178
-    public int size() {
179
-        return actions.size();
180
-    }
181
-
182 173
     /**
183 174
      * Removes the specified action from this group.
184 175
      *
@@ -194,26 +185,6 @@ public class ActionGroup implements Iterable<Action> {
194 185
         return actions.iterator();
195 186
     }
196 187
 
197
-    /**
198
-     * Retrieves the action at the specified index.
199
-     *
200
-     * @param index The index of the action to return
201
-     * @return The action at the specified index
202
-     */
203
-    public Action get(final int index) {
204
-        return actions.get(index);
205
-    }
206
-
207
-    /**
208
-     * Determines if this group contains the specified action.
209
-     *
210
-     * @param action The action to search for
211
-     * @return True if the action is contained in this list, false otherwise
212
-     */
213
-    public boolean contains(final Action action) {
214
-        return actions.contains(action);
215
-    }
216
-
217 188
     /**
218 189
      * Removes all actions from this group, and removes all meta-data.
219 190
      */

+ 0
- 12
src/com/dmdirc/actions/ActionManager.java Parādīt failu

@@ -581,18 +581,6 @@ public class ActionManager implements ActionController {
581 581
         return res;
582 582
     }
583 583
 
584
-    /** {@inheritDoc} */
585
-    @Override
586
-    public List<ActionType> getAllTypes() {
587
-        return Collections.unmodifiableList(types);
588
-    }
589
-
590
-    /** {@inheritDoc} */
591
-    @Override
592
-    public List<ActionComparison> getAllComparisons() {
593
-        return Collections.unmodifiableList(comparisons);
594
-    }
595
-
596 584
     /** {@inheritDoc} */
597 585
     @Override
598 586
     public ActionComponent getComponent(final String type) {

+ 0
- 14
src/com/dmdirc/interfaces/ActionController.java Parādīt failu

@@ -123,20 +123,6 @@ public interface ActionController {
123 123
     @Precondition(value = "The specified type is not null")
124 124
     List<ActionType> findCompatibleTypes(final ActionType type);
125 125
 
126
-    /**
127
-     * Returns a list of all the action types registered by this manager.
128
-     *
129
-     * @return A list of registered action comparisons
130
-     */
131
-    List<ActionComparison> getAllComparisons();
132
-
133
-    /**
134
-     * Returns a list of all the action types registered by this manager.
135
-     *
136
-     * @return A list of registered action types
137
-     */
138
-    List<ActionType> getAllTypes();
139
-
140 126
     /**
141 127
      * Returns the action type specified by the given string, or null if it
142 128
      * doesn't match a valid registered action type.

+ 0
- 8
src/com/dmdirc/interfaces/Connection.java Parādīt failu

@@ -25,7 +25,6 @@ package com.dmdirc.interfaces;
25 25
 import com.dmdirc.Channel;
26 26
 import com.dmdirc.Invite;
27 27
 import com.dmdirc.Query;
28
-import com.dmdirc.Raw;
29 28
 import com.dmdirc.ServerState;
30 29
 import com.dmdirc.ServerStatus;
31 30
 import com.dmdirc.interfaces.config.ConfigProvider;
@@ -310,13 +309,6 @@ public interface Connection {
310 309
      */
311 310
     Query getQuery(final String host, final boolean focus);
312 311
 
313
-    /**
314
-     * Retrieves the raw window associated with this server.
315
-     *
316
-     * @return The raw window associated with this server.
317
-     */
318
-    Raw getRaw();
319
-
320 312
     /**
321 313
      * Retrieves the identity for this server.
322 314
      *

+ 0
- 5
test/com/dmdirc/InviteTest.java Parādīt failu

@@ -47,11 +47,6 @@ public class InviteTest {
47 47
         ts = new Date().getTime();
48 48
     }
49 49
 
50
-    @Test
51
-    public void testGetServer() {
52
-        assertSame(server, invite.getServer());
53
-    }
54
-
55 50
     @Test
56 51
     public void testGetChannel() {
57 52
         assertEquals("#channel", invite.getChannel());

+ 0
- 17
test/com/dmdirc/ServerManagerTest.java Parādīt failu

@@ -25,10 +25,8 @@ package com.dmdirc;
25 25
 import com.dmdirc.interfaces.CommandController;
26 26
 import com.dmdirc.interfaces.config.IdentityController;
27 27
 import com.dmdirc.interfaces.config.IdentityFactory;
28
-import com.dmdirc.messages.MessageSinkManager;
29 28
 import com.dmdirc.parser.common.ChannelJoinRequest;
30 29
 import com.dmdirc.ui.WindowManager;
31
-import com.dmdirc.ui.input.TabCompleterFactory;
32 30
 
33 31
 import javax.inject.Provider;
34 32
 
@@ -91,21 +89,6 @@ public class ServerManagerTest {
91 89
         assertEquals(serverManager.getServers().size(), serverManager.numServers());
92 90
     }
93 91
 
94
-    @Test
95
-    public void testGetServerByAddress() {
96
-        final Server serverA = mock(Server.class);
97
-        final Server serverB = mock(Server.class);
98
-        when(serverA.getAddress()).thenReturn("255.255.255.255");
99
-        when(serverB.getAddress()).thenReturn("255.255.255.254");
100
-
101
-        serverManager.registerServer(serverA);
102
-        serverManager.registerServer(serverB);
103
-
104
-        assertEquals(serverA, serverManager.getServersByAddress("255.255.255.255").get(0));
105
-        assertEquals(serverB, serverManager.getServersByAddress("255.255.255.254").get(0));
106
-        assertEquals(0, serverManager.getServersByAddress("255.255.255.253").size());
107
-    }
108
-
109 92
     @Test
110 93
     public void testGetServerByNetwork() throws InterruptedException {
111 94
         final Server serverA = mock(Server.class);

+ 4
- 13
test/com/dmdirc/actions/ActionGroupTest.java Parādīt failu

@@ -94,27 +94,18 @@ public class ActionGroupTest {
94 94
     public void testClear() {
95 95
         ActionGroup instance = new ActionGroup("zzz");
96 96
         instance.add(null);
97
-        assertEquals(1, instance.size());
97
+        assertTrue(instance.iterator().hasNext());
98 98
         instance.clear();
99
-        assertEquals(0, instance.size());
99
+        assertFalse(instance.iterator().hasNext());
100 100
     }
101 101
 
102 102
     @Test
103 103
     public void testRemove() {
104 104
         ActionGroup instance = new ActionGroup("zzz");
105 105
         instance.add(null);
106
-        assertEquals(1, instance.size());
106
+        assertTrue(instance.iterator().hasNext());
107 107
         instance.remove(null);
108
-        assertEquals(0, instance.size());
109
-    }
110
-
111
-    @Test
112
-    public void testContains() {
113
-        ActionGroup instance = new ActionGroup("zzz");
114
-        instance.add(null);
115
-        assertTrue(instance.contains(null));
116
-        instance.remove(null);
117
-        assertFalse(instance.contains(null));
108
+        assertFalse(instance.iterator().hasNext());
118 109
     }
119 110
 
120 111
     @Test

Notiek ielāde…
Atcelt
Saglabāt