diff -r ed84c8bdd87b -r f5b57e221e38 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 Jul 05 13:19:19 2012 +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("."); + } }