|
@@ -38,6 +38,8 @@ import com.dmdirc.interfaces.config.AggregateConfigProvider;
|
38
|
38
|
|
39
|
39
|
import javax.annotation.Nonnull;
|
40
|
40
|
|
|
41
|
+import static com.google.common.base.Preconditions.checkNotNull;
|
|
42
|
+
|
41
|
43
|
/**
|
42
|
44
|
* A command parser used in the context of a server.
|
43
|
45
|
*/
|
|
@@ -64,7 +66,7 @@ public class ServerCommandParser extends GlobalCommandParser {
|
64
|
66
|
final DMDircMBassador eventBus,
|
65
|
67
|
final Connection connection) {
|
66
|
68
|
super(configManager, commandController, eventBus);
|
67
|
|
- this.server = connection;
|
|
69
|
+ this.server = checkNotNull(connection);
|
68
|
70
|
}
|
69
|
71
|
|
70
|
72
|
/** Loads the relevant commands into the parser. */
|