diff -r ed84c8bdd87b -r 5d7d1adf387f src/org/sonews/daemon/command/ListGroupCommand.java --- a/src/org/sonews/daemon/command/ListGroupCommand.java Sun Aug 29 17:28:58 2010 +0200 +++ b/src/org/sonews/daemon/command/ListGroupCommand.java Tue Jun 07 11:55:22 2011 +0200 @@ -33,62 +33,56 @@ public class ListGroupCommand implements Command { - @Override - public String[] getSupportedCommandStrings() - { - return new String[]{"LISTGROUP"}; - } + @Override + public String[] getSupportedCommandStrings() + { + return new String[] {"LISTGROUP"}; + } - @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 false; - } + @Override + public boolean isStateful() + { + return false; + } - @Override - public void processLine(NNTPConnection conn, final String commandName, byte[] raw) - throws IOException, StorageBackendException - { - final String[] command = commandName.split(" "); + @Override + public void processLine(NNTPConnection conn, final String commandName, byte[] raw) + throws IOException, StorageBackendException + { + final String[] command = commandName.split(" "); - Channel group; - if(command.length >= 2) - { - group = Channel.getByName(command[1]); - } - else - { - group = conn.getCurrentChannel(); - } + Channel group; + if (command.length >= 2) { + group = Channel.getByName(command[1]); + } else { + group = conn.getCurrentChannel(); + } - if (group == null) - { - conn.println("412 no group selected; use GROUP command"); - return; - } + if (group == null) { + conn.println("412 no group selected; use GROUP command"); + return; + } - List ids = group.getArticleNumbers(); - conn.println("211 " + ids.size() + " " + - group.getFirstArticleNumber() + " " + - group.getLastArticleNumber() + " list of article numbers follow"); - for(long id : ids) - { - // One index number per line - conn.println(Long.toString(id)); - } - conn.println("."); - } - + List ids = group.getArticleNumbers(); + conn.println("211 " + ids.size() + " " + + group.getFirstArticleNumber() + " " + + group.getLastArticleNumber() + " list of article numbers follow"); + for (long id : ids) { + // One index number per line + conn.println(Long.toString(id)); + } + conn.println("."); + } }