// TODO: also not sure whether the old implementation shares this flaw
String commandName = request.atom();
ImapCommandParser helperCommand = parserFactory.getParser(commandName);
// TODO: replace abstract class with interface
if (helperCommand == null || !(helperCommand instanceof AbstractUidCommandParser)) {
throw new DecodingException(HumanReadableText.ILLEGAL_ARGUMENTS, "Invalid UID command: '" + commandName + "'");
}
final AbstractUidCommandParser uidEnabled = (AbstractUidCommandParser) helperCommand;
final ImapMessage result = uidEnabled.decode(request, tag, true, session);
return result;
}