private final BufferedReader reader;
/** The writer to write the results to. */
- private final Writer writer;
+ private final DuplicateLineSuppressingWriter writer;
private final Collection<Download> failedDownloads;
/**
if (line.equals("")) {
line = lastLine;
}
+ writer.reset();
String[] words = line.split(" +");
String commandName = words[0];
Collection<Command> eligibleCommands = findEligibleCommands(commandName);
Command command = eligibleCommands.iterator().next();
List<String> parameters = from(asList(words)).skip(1).toList();
state = command.execute(state, parameters, writer);
+ writer.flush();
}
lastLine = line;