Просмотр исходного кода

Mark some Command params as nullable.

Change-Id: I6817cf188e01490b991d1e0db6f58c975957f634
Reviewed-on: http://gerrit.dmdirc.com/3949
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
pull/1/head
Chris Smith 9 лет назад
Родитель
Сommit
a11ce023d9
1 измененных файлов: 3 добавлений и 2 удалений
  1. 3
    2
      src/com/dmdirc/commandparser/commands/Command.java

+ 3
- 2
src/com/dmdirc/commandparser/commands/Command.java Просмотреть файл

@@ -29,6 +29,7 @@ import com.dmdirc.interfaces.CommandController;
29 29
 import com.dmdirc.ui.messages.Styliser;
30 30
 
31 31
 import javax.annotation.Nonnull;
32
+import javax.annotation.Nullable;
32 33
 
33 34
 /**
34 35
  * Represents a generic command.
@@ -58,7 +59,7 @@ public abstract class Command {
58 59
      * @param type     The type of message to send
59 60
      * @param args     The arguments of the message
60 61
      */
61
-    protected final void sendLine(final FrameContainer target,
62
+    protected final void sendLine(@Nullable final FrameContainer target,
62 63
             final boolean isSilent, final String type, final Object... args) {
63 64
         if (!isSilent && target != null) {
64 65
             target.addLine(type, args);
@@ -73,7 +74,7 @@ public abstract class Command {
73 74
      * @param name     The name of the command that's raising the error
74 75
      * @param args     The arguments that the command accepts or expects
75 76
      */
76
-    protected final void showUsage(final FrameContainer target,
77
+    protected final void showUsage(@Nullable final FrameContainer target,
77 78
             final boolean isSilent, final String name, final String args) {
78 79
         sendLine(target, isSilent, "commandUsage",
79 80
                 controller.getCommandChar(),

Загрузка…
Отмена
Сохранить