Browse Source

Remove some redundant casts

Change-Id: I234d41cf734bb70a52aeb04359f21031f7d1d521
Reviewed-on: http://gerrit.dmdirc.com/3884
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
pull/1/head
Chris Smith 9 years ago
parent
commit
6706e20690

+ 1
- 2
src/com/dmdirc/commandparser/commands/context/ChatCommandContext.java View File

@@ -24,7 +24,6 @@ package com.dmdirc.commandparser.commands.context;
24 24
 
25 25
 import com.dmdirc.FrameContainer;
26 26
 import com.dmdirc.MessageTarget;
27
-import com.dmdirc.Server;
28 27
 import com.dmdirc.commandparser.CommandInfo;
29 28
 
30 29
 /**
@@ -46,7 +45,7 @@ public class ChatCommandContext extends ServerCommandContext {
46 45
      */
47 46
     public ChatCommandContext(final FrameContainer source,
48 47
             final CommandInfo commandInfo, final MessageTarget chat) {
49
-        super(source, commandInfo, (Server) chat.getConnection());
48
+        super(source, commandInfo, chat.getConnection());
50 49
         this.chat = chat;
51 50
     }
52 51
 

+ 1
- 1
src/com/dmdirc/commandparser/commands/server/OpenQuery.java View File

@@ -113,7 +113,7 @@ public class OpenQuery extends Command implements IntelligentCommand,
113 113
     public int getLineCount(final FrameContainer origin, final CommandArguments arguments) {
114 114
         if (arguments.getArguments().length >= 2) {
115 115
             final String target = arguments.getArguments()[0];
116
-            return ((Connection) origin.getConnection()).getWindowModel().getNumLines("PRIVMSG "
116
+            return origin.getConnection().getWindowModel().getNumLines("PRIVMSG "
117 117
                     + target + " :" + arguments.getArgumentsAsString(1));
118 118
         } else {
119 119
             return 1;

Loading…
Cancel
Save