You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by no...@apache.org on 2010/04/09 17:56:51 UTC
svn commit: r932475 -
/james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/AbstractCommandDispatcher.java
Author: norman
Date: Fri Apr 9 15:56:51 2010
New Revision: 932475
URL: http://svn.apache.org/viewvc?rev=932475&view=rev
Log:
Write only to the session if the response is not null
Modified:
james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/AbstractCommandDispatcher.java
Modified: james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/AbstractCommandDispatcher.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/AbstractCommandDispatcher.java?rev=932475&r1=932474&r2=932475&view=diff
==============================================================================
--- james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/AbstractCommandDispatcher.java (original)
+++ james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/AbstractCommandDispatcher.java Fri Apr 9 15:56:51 2010
@@ -138,18 +138,14 @@ public abstract class AbstractCommandDis
int count = commandHandlers.size();
for (int i = 0; i < count; i++) {
Response response = commandHandlers.get(i).onCommand(session, new BaseRequest(curCommandName, curCommandArgument));
- session.writeResponse(response);
// if the response is received, stop processing of command
// handlers
if (response != null) {
+ session.writeResponse(response);
+
break;
}
-
- // NOTE we should never hit this line, otherwise we ended the
- // CommandHandlers with
- // no responses.
- // (The note is valid for i == count-1)
}
} catch (UnsupportedEncodingException e) {
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org