This is an automated email from the ASF dual-hosted git repository. btellier pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/james-project.git
commit b0e0a758ac63d19a28e234535c218d59f82bca39 Author: Benoit Tellier <[email protected]> AuthorDate: Fri Dec 6 15:08:15 2019 +0700 PROTOCOLS-120 Slightly improve AbstractImapCommandParser style --- .../james/imap/decode/base/AbstractImapCommandParser.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/protocols/imap/src/main/java/org/apache/james/imap/decode/base/AbstractImapCommandParser.java b/protocols/imap/src/main/java/org/apache/james/imap/decode/base/AbstractImapCommandParser.java index ac880d6..e4f62af 100644 --- a/protocols/imap/src/main/java/org/apache/james/imap/decode/base/AbstractImapCommandParser.java +++ b/protocols/imap/src/main/java/org/apache/james/imap/decode/base/AbstractImapCommandParser.java @@ -45,7 +45,6 @@ public abstract class AbstractImapCommandParser implements MessagingImapCommandP private StatusResponseFactory statusResponseFactory; public AbstractImapCommandParser(ImapCommand command) { - super(); this.command = command; } @@ -72,19 +71,16 @@ public abstract class AbstractImapCommandParser implements MessagingImapCommandP */ @Override public final ImapMessage parse(ImapRequestLineReader request, Tag tag, ImapSession session) { - ImapMessage result; if (!command.validForState(session.getState())) { - result = statusResponseFactory.taggedNo(tag, command, HumanReadableText.INVALID_COMMAND); + return statusResponseFactory.taggedNo(tag, command, HumanReadableText.INVALID_COMMAND); } else { try { - - result = decode(command, request, tag, session); + return decode(command, request, tag, session); } catch (DecodingException e) { LOGGER.debug("Cannot parse protocol ", e); - result = statusResponseFactory.taggedBad(tag, command, e.getKey()); + return statusResponseFactory.taggedBad(tag, command, e.getKey()); } } - return result; } /** --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
