if (logger != null && logger.isDebugEnabled()) {
logger.debug("Unknown message: " + message);
}
final ImapResponseMessage result;
if (message instanceof ImapRequest) {
ImapRequest request = (ImapRequest) message;
final String tag = request.getTag();
final ImapCommand command = request.getCommand();
result = factory.taggedBad(tag, command, HumanReadableText.UNKNOWN_COMMAND);
} else {
result = factory.untaggedBad(HumanReadableText.UNKNOWN_COMMAND);
}
return result;