Bläddra i källkod

Merge pull request #218 from csmith/master

Fix some nullable annotations in debug plugin.
pull/219/head
Greg Holmes 9 år sedan
förälder
incheckning
781ff6c366

+ 2
- 1
debug/src/com/dmdirc/addons/debug/commands/Benchmark.java Visa fil

@@ -28,6 +28,7 @@ import com.dmdirc.addons.debug.DebugCommand;
28 28
 import com.dmdirc.commandparser.CommandArguments;
29 29
 import com.dmdirc.commandparser.commands.context.CommandContext;
30 30
 
31
+import javax.annotation.Nonnull;
31 32
 import javax.inject.Inject;
32 33
 import javax.inject.Provider;
33 34
 
@@ -58,7 +59,7 @@ public class Benchmark extends DebugCommand {
58 59
     }
59 60
 
60 61
     @Override
61
-    public void execute(final FrameContainer origin,
62
+    public void execute(@Nonnull final FrameContainer origin,
62 63
             final CommandArguments args, final CommandContext context) {
63 64
         final long[] results = new long[10];
64 65
 

+ 2
- 1
debug/src/com/dmdirc/addons/debug/commands/ColourSpam.java Visa fil

@@ -28,6 +28,7 @@ import com.dmdirc.addons.debug.DebugCommand;
28 28
 import com.dmdirc.commandparser.CommandArguments;
29 29
 import com.dmdirc.commandparser.commands.context.CommandContext;
30 30
 
31
+import javax.annotation.Nonnull;
31 32
 import javax.inject.Inject;
32 33
 import javax.inject.Provider;
33 34
 
@@ -57,7 +58,7 @@ public class ColourSpam extends DebugCommand {
57 58
     }
58 59
 
59 60
     @Override
60
-    public void execute(final FrameContainer origin,
61
+    public void execute(@Nonnull final FrameContainer origin,
61 62
             final CommandArguments args, final CommandContext context) {
62 63
         for (int i = 0; i < 100; i++) {
63 64
             sendLine(origin, args.isSilent(), FORMAT_OUTPUT,

+ 2
- 1
debug/src/com/dmdirc/addons/debug/commands/ConfigInfo.java Visa fil

@@ -29,6 +29,7 @@ import com.dmdirc.commandparser.CommandArguments;
29 29
 import com.dmdirc.commandparser.commands.context.CommandContext;
30 30
 import com.dmdirc.interfaces.config.ConfigProvider;
31 31
 
32
+import javax.annotation.Nonnull;
32 33
 import javax.inject.Inject;
33 34
 import javax.inject.Provider;
34 35
 
@@ -58,7 +59,7 @@ public class ConfigInfo extends DebugCommand {
58 59
     }
59 60
 
60 61
     @Override
61
-    public void execute(final FrameContainer origin,
62
+    public void execute(@Nonnull final FrameContainer origin,
62 63
             final CommandArguments args, final CommandContext context) {
63 64
         for (ConfigProvider source : origin.getConfigManager().getSources()) {
64 65
             sendLine(origin, args.isSilent(), FORMAT_OUTPUT, source.getTarget()

+ 2
- 1
debug/src/com/dmdirc/addons/debug/commands/EventBusViewer.java Visa fil

@@ -41,6 +41,7 @@ import com.dmdirc.util.URLBuilder;
41 41
 
42 42
 import java.lang.reflect.Method;
43 43
 
44
+import javax.annotation.Nonnull;
44 45
 import javax.inject.Inject;
45 46
 import javax.inject.Provider;
46 47
 
@@ -89,7 +90,7 @@ public class EventBusViewer extends DebugCommand {
89 90
     }
90 91
 
91 92
     @Override
92
-    public void execute(final FrameContainer origin,
93
+    public void execute(@Nonnull final FrameContainer origin,
93 94
             final CommandArguments args, final CommandContext context) {
94 95
         final boolean isGlobal = args.getArguments().length > 0
95 96
                 && "--global".equals(args.getArguments()[0]);

+ 2
- 1
debug/src/com/dmdirc/addons/debug/commands/FakeError.java Visa fil

@@ -34,6 +34,7 @@ import com.dmdirc.events.UserErrorEvent;
34 34
 import com.dmdirc.logger.ErrorLevel;
35 35
 import com.dmdirc.ui.input.AdditionalTabTargets;
36 36
 
37
+import javax.annotation.Nonnull;
37 38
 import javax.inject.Inject;
38 39
 import javax.inject.Provider;
39 40
 
@@ -69,7 +70,7 @@ public class FakeError extends DebugCommand implements IntelligentCommand {
69 70
     }
70 71
 
71 72
     @Override
72
-    public void execute(final FrameContainer origin,
73
+    public void execute(@Nonnull final FrameContainer origin,
73 74
             final CommandArguments args, final CommandContext context) {
74 75
         if ((args.getArguments().length == 1
75 76
                 || args.getArguments().length == 2)

+ 2
- 1
debug/src/com/dmdirc/addons/debug/commands/FirstRun.java Visa fil

@@ -30,6 +30,7 @@ import com.dmdirc.commandparser.CommandArguments;
30 30
 import com.dmdirc.commandparser.commands.context.CommandContext;
31 31
 import com.dmdirc.events.FirstRunEvent;
32 32
 
33
+import javax.annotation.Nonnull;
33 34
 import javax.inject.Inject;
34 35
 import javax.inject.Provider;
35 36
 
@@ -65,7 +66,7 @@ public class FirstRun extends DebugCommand {
65 66
     }
66 67
 
67 68
     @Override
68
-    public void execute(final FrameContainer origin,
69
+    public void execute(@Nonnull final FrameContainer origin,
69 70
             final CommandArguments args, final CommandContext context) {
70 71
         eventBus.publish(new FirstRunEvent());
71 72
     }

+ 2
- 1
debug/src/com/dmdirc/addons/debug/commands/ForceUpdate.java Visa fil

@@ -35,6 +35,7 @@ import com.dmdirc.ui.messages.Styliser;
35 35
 import com.dmdirc.updater.UpdateChecker;
36 36
 import com.dmdirc.updater.manager.CachingUpdateManager;
37 37
 
38
+import javax.annotation.Nonnull;
38 39
 import javax.inject.Inject;
39 40
 import javax.inject.Provider;
40 41
 
@@ -87,7 +88,7 @@ public class ForceUpdate extends DebugCommand {
87 88
     }
88 89
 
89 90
     @Override
90
-    public void execute(final FrameContainer origin,
91
+    public void execute(@Nonnull final FrameContainer origin,
91 92
             final CommandArguments args, final CommandContext context) {
92 93
         if (globalConfig.getOptionBool("updater", "enable")) {
93 94
             UpdateChecker.checkNow(updateManager, identityController, eventBus,

+ 2
- 1
debug/src/com/dmdirc/addons/debug/commands/GlobalConfigInfo.java Visa fil

@@ -31,6 +31,7 @@ import com.dmdirc.commandparser.commands.context.CommandContext;
31 31
 import com.dmdirc.interfaces.config.AggregateConfigProvider;
32 32
 import com.dmdirc.interfaces.config.ConfigProvider;
33 33
 
34
+import javax.annotation.Nonnull;
34 35
 import javax.inject.Inject;
35 36
 import javax.inject.Provider;
36 37
 
@@ -68,7 +69,7 @@ public class GlobalConfigInfo extends DebugCommand {
68 69
     }
69 70
 
70 71
     @Override
71
-    public void execute(final FrameContainer origin,
72
+    public void execute(@Nonnull final FrameContainer origin,
72 73
             final CommandArguments args, final CommandContext context) {
73 74
         for (ConfigProvider source : globalConfig.getSources()) {
74 75
             sendLine(origin, args.isSilent(), FORMAT_OUTPUT, source.getTarget()

+ 2
- 1
debug/src/com/dmdirc/addons/debug/commands/Identities.java Visa fil

@@ -32,6 +32,7 @@ import com.dmdirc.interfaces.config.IdentityController;
32 32
 
33 33
 import java.util.List;
34 34
 
35
+import javax.annotation.Nonnull;
35 36
 import javax.inject.Inject;
36 37
 import javax.inject.Provider;
37 38
 
@@ -67,7 +68,7 @@ public class Identities extends DebugCommand {
67 68
     }
68 69
 
69 70
     @Override
70
-    public void execute(final FrameContainer origin,
71
+    public void execute(@Nonnull final FrameContainer origin,
71 72
             final CommandArguments args, final CommandContext context) {
72 73
         final String type;
73 74
 

+ 2
- 1
debug/src/com/dmdirc/addons/debug/commands/MemInfo.java Visa fil

@@ -28,6 +28,7 @@ import com.dmdirc.addons.debug.DebugCommand;
28 28
 import com.dmdirc.commandparser.CommandArguments;
29 29
 import com.dmdirc.commandparser.commands.context.CommandContext;
30 30
 
31
+import javax.annotation.Nonnull;
31 32
 import javax.inject.Inject;
32 33
 import javax.inject.Provider;
33 34
 
@@ -57,7 +58,7 @@ public class MemInfo extends DebugCommand {
57 58
     }
58 59
 
59 60
     @Override
60
-    public void execute(final FrameContainer origin,
61
+    public void execute(@Nonnull final FrameContainer origin,
61 62
             final CommandArguments args, final CommandContext context) {
62 63
         sendLine(origin, args.isSilent(), FORMAT_OUTPUT, "Total Memory: "
63 64
                 + Runtime.getRuntime().totalMemory());

+ 2
- 1
debug/src/com/dmdirc/addons/debug/commands/Notify.java Visa fil

@@ -31,6 +31,7 @@ import com.dmdirc.util.colours.Colour;
31 31
 
32 32
 import java.util.Optional;
33 33
 
34
+import javax.annotation.Nonnull;
34 35
 import javax.inject.Inject;
35 36
 import javax.inject.Provider;
36 37
 
@@ -60,7 +61,7 @@ public class Notify extends DebugCommand {
60 61
     }
61 62
 
62 63
     @Override
63
-    public void execute(final FrameContainer origin,
64
+    public void execute(@Nonnull final FrameContainer origin,
64 65
             final CommandArguments args, final CommandContext context) {
65 66
         final Optional<Colour> colour = origin.getNotification();
66 67
         if (colour.isPresent()) {

+ 2
- 1
debug/src/com/dmdirc/addons/debug/commands/RunGC.java Visa fil

@@ -28,6 +28,7 @@ import com.dmdirc.addons.debug.DebugCommand;
28 28
 import com.dmdirc.commandparser.CommandArguments;
29 29
 import com.dmdirc.commandparser.commands.context.CommandContext;
30 30
 
31
+import javax.annotation.Nonnull;
31 32
 import javax.inject.Inject;
32 33
 import javax.inject.Provider;
33 34
 
@@ -57,7 +58,7 @@ public class RunGC extends DebugCommand {
57 58
     }
58 59
 
59 60
     @Override
60
-    public void execute(final FrameContainer origin,
61
+    public void execute(@Nonnull final FrameContainer origin,
61 62
             final CommandArguments args, final CommandContext context) {
62 63
         System.gc();
63 64
         sendLine(origin, args.isSilent(), FORMAT_OUTPUT,

+ 2
- 1
debug/src/com/dmdirc/addons/debug/commands/ServerInfo.java Visa fil

@@ -31,6 +31,7 @@ import com.dmdirc.interfaces.Connection;
31 31
 
32 32
 import java.util.Optional;
33 33
 
34
+import javax.annotation.Nonnull;
34 35
 import javax.inject.Inject;
35 36
 import javax.inject.Provider;
36 37
 
@@ -60,7 +61,7 @@ public class ServerInfo extends DebugCommand {
60 61
     }
61 62
 
62 63
     @Override
63
-    public void execute(final FrameContainer origin,
64
+    public void execute(@Nonnull final FrameContainer origin,
64 65
             final CommandArguments args, final CommandContext context) {
65 66
         final Optional<Connection> optionalConnection = origin.getConnection();
66 67
         if (optionalConnection.isPresent()) {

+ 2
- 1
debug/src/com/dmdirc/addons/debug/commands/ServerState.java Visa fil

@@ -31,6 +31,7 @@ import com.dmdirc.interfaces.Connection;
31 31
 
32 32
 import java.util.Optional;
33 33
 
34
+import javax.annotation.Nonnull;
34 35
 import javax.inject.Inject;
35 36
 import javax.inject.Provider;
36 37
 
@@ -60,7 +61,7 @@ public class ServerState extends DebugCommand {
60 61
     }
61 62
 
62 63
     @Override
63
-    public void execute(final FrameContainer origin,
64
+    public void execute(@Nonnull final FrameContainer origin,
64 65
             final CommandArguments args, final CommandContext context) {
65 66
         final Optional<Connection> optionalConnection = origin.getConnection();
66 67
         if (optionalConnection.isPresent()) {

+ 2
- 1
debug/src/com/dmdirc/addons/debug/commands/Services.java Visa fil

@@ -33,6 +33,7 @@ import com.dmdirc.plugins.ServiceManager;
33 33
 import com.dmdirc.plugins.ServiceProvider;
34 34
 import com.dmdirc.ui.input.AdditionalTabTargets;
35 35
 
36
+import javax.annotation.Nonnull;
36 37
 import javax.inject.Inject;
37 38
 import javax.inject.Provider;
38 39
 
@@ -69,7 +70,7 @@ public class Services extends DebugCommand implements IntelligentCommand {
69 70
     }
70 71
 
71 72
     @Override
72
-    public void execute(final FrameContainer origin,
73
+    public void execute(@Nonnull final FrameContainer origin,
73 74
             final CommandArguments args, final CommandContext context) {
74 75
         sendLine(origin, args.isSilent(), FORMAT_OUTPUT, "Available Services:");
75 76
         for (Service service : serviceManager.getAllServices()) {

+ 2
- 1
debug/src/com/dmdirc/addons/debug/commands/StatusbarMessage.java Visa fil

@@ -33,6 +33,7 @@ import com.dmdirc.events.StatusBarMessageEvent;
33 33
 import com.dmdirc.interfaces.config.AggregateConfigProvider;
34 34
 import com.dmdirc.ui.StatusMessage;
35 35
 
36
+import javax.annotation.Nonnull;
36 37
 import javax.inject.Inject;
37 38
 import javax.inject.Provider;
38 39
 
@@ -75,7 +76,7 @@ public class StatusbarMessage extends DebugCommand {
75 76
     }
76 77
 
77 78
     @Override
78
-    public void execute(final FrameContainer origin,
79
+    public void execute(@Nonnull final FrameContainer origin,
79 80
             final CommandArguments args, final CommandContext context) {
80 81
         eventBus.publishAsync(new StatusBarMessageEvent(new StatusMessage(null,
81 82
                 "Test: " + args.getArgumentsAsString(), null, 5, globalConfig)));

+ 2
- 1
debug/src/com/dmdirc/addons/debug/commands/Threads.java Visa fil

@@ -31,6 +31,7 @@ import com.dmdirc.ui.messages.Styliser;
31 31
 
32 32
 import java.util.Map.Entry;
33 33
 
34
+import javax.annotation.Nonnull;
34 35
 import javax.inject.Inject;
35 36
 import javax.inject.Provider;
36 37
 
@@ -60,7 +61,7 @@ public class Threads extends DebugCommand {
60 61
     }
61 62
 
62 63
     @Override
63
-    public void execute(final FrameContainer origin,
64
+    public void execute(@Nonnull final FrameContainer origin,
64 65
             final CommandArguments args, final CommandContext context) {
65 66
         for (Entry<Thread, StackTraceElement[]> thread
66 67
                 : Thread.getAllStackTraces().entrySet()) {

+ 2
- 1
debug/src/com/dmdirc/addons/debug/commands/Time.java Visa fil

@@ -31,6 +31,7 @@ import com.dmdirc.commandparser.commands.context.CommandContext;
31 31
 import com.dmdirc.ui.input.AdditionalTabTargets;
32 32
 import com.dmdirc.ui.input.TabCompletionType;
33 33
 
34
+import javax.annotation.Nonnull;
34 35
 import javax.inject.Inject;
35 36
 import javax.inject.Provider;
36 37
 
@@ -60,7 +61,7 @@ public class Time extends DebugCommand implements IntelligentCommand {
60 61
     }
61 62
 
62 63
     @Override
63
-    public void execute(final FrameContainer origin,
64
+    public void execute(@Nonnull final FrameContainer origin,
64 65
             final CommandArguments args, final CommandContext context) {
65 66
         doTime(origin, args);
66 67
     }

Laddar…
Avbryt
Spara