MailFolder inbox = state.getFolder();
String[] cmdLine = cmd.split(" ");
if (cmdLine.length < 3)
throw new IllegalArgumentException("range and line count required");
String msgNumStr = cmdLine[1];
<BUG>List msgList = inbox.getMessages(new MsgRangeFilter(msgNumStr, false));
</BUG>
if (msgList.size() != 1) {
conn.println("-ERR no such message");
return;

MailFolder inbox = state.getFolder();
String[] cmdLine = cmd.split(" ");
if (cmdLine.length < 3)
throw new IllegalArgumentException("range and line count required");
String msgNumStr = cmdLine[1];
List<StoredMessage> msgList = inbox.getMessages(new MsgRangeFilter(msgNumStr, false));
if (msgList.size() != 1) {
conn.println("-ERR no such message");
return;
