diff -r ed84c8bdd87b -r a788bf0e1080 src/org/sonews/daemon/command/HelpCommand.java --- a/src/org/sonews/daemon/command/HelpCommand.java Sun Aug 29 17:28:58 2010 +0200 +++ b/src/org/sonews/daemon/command/HelpCommand.java Thu Oct 20 10:50:58 2011 +0200 @@ -35,66 +35,56 @@ public class HelpCommand implements Command { - @Override - public boolean hasFinished() - { - return true; - } + @Override + public boolean hasFinished() + { + return true; + } - @Override - public String impliedCapability() - { - return null; - } + @Override + public String impliedCapability() + { + return null; + } - @Override - public boolean isStateful() - { - return true; - } + @Override + public boolean isStateful() + { + return true; + } - @Override - public String[] getSupportedCommandStrings() - { - return new String[]{"HELP"}; - } - - @Override - public void processLine(NNTPConnection conn, final String line, byte[] raw) - throws IOException - { - final String[] command = line.split(" "); - conn.println("100 help text follows"); + @Override + public String[] getSupportedCommandStrings() + { + return new String[] {"HELP"}; + } - if(line.length() <= 1) - { - final String[] help = Resource - .getAsString("helpers/helptext", true).split("\n"); - for(String hstr : help) - { - conn.println(hstr); - } + @Override + public void processLine(NNTPConnection conn, final String line, byte[] raw) + throws IOException + { + final String[] command = line.split(" "); + conn.println("100 help text follows"); - Set commandNames = CommandSelector.getCommandNames(); - for(String cmdName : commandNames) - { - conn.println(cmdName); - } - } - else - { - Command cmd = CommandSelector.getInstance().get(command[1]); - if(cmd instanceof HelpfulCommand) - { - conn.println(((HelpfulCommand)cmd).getHelpString()); - } - else - { - conn.println("No further help information available."); - } - } - - conn.println("."); - } - + if (line.length() <= 1) { + final String[] help = Resource.getAsString("helpers/helptext", true).split("\n"); + for (String hstr : help) { + conn.println(hstr); + } + + Set commandNames = CommandSelector.getCommandNames(); + for (String cmdName : commandNames) { + conn.println(cmdName); + } + } else { + Command cmd = CommandSelector.getInstance().get(command[1]); + if (cmd instanceof HelpfulCommand) { + conn.println(((HelpfulCommand) cmd).getHelpString()); + } else { + conn.println("No further help information available."); + } + } + + conn.println("."); + } }