Closed webpigeon closed 10 years ago
[DEBUG] Command: help [DEBUG] action: null [DEBUG] args: null java.lang.NullPointerException at java.util.TreeMap.getEntry(TreeMap.java:342) at java.util.TreeMap.containsKey(TreeMap.java:227) at uk.co.unitycoders.pircbotx.commandprocessor.CommandNode.isValidAction(CommandNode.java:30) at uk.co.unitycoders.pircbotx.commandprocessor.CommandProcessor.invoke(CommandProcessor.java:121) at uk.co.unitycoders.pircbotx.commandprocessor.CommandProcessor.invoke(CommandProcessor.java:79) at uk.co.unitycoders.pircbotx.commandprocessor.CommandListener.onMessage(CommandListener.java:41) at org.pircbotx.hooks.ListenerAdapter.onEvent(ListenerAdapter.java:63) at org.pircbotx.hooks.managers.ThreadedListenerManager$1.call(ThreadedListenerManager.java:119) at org.pircbotx.hooks.managers.ThreadedListenerManager$1.call(ThreadedListenerManager.java:115) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745)
looks like I'm missing a check in the command processor's invoke method to check if the action/args are null, if they are it should throw error/return false.
Fixed in commit 7ae85023fd9d1de2fcfbaab271667884a5c42f8c
When I migrated the other commands to use our internal message class, i missed the help's list command. This means that calling &help results in an exception being thrown rather than listing the available commands.
In order to fix this I will need to modify the method signature of the onList command to take a Message rather than a MessageEvent.