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: [email protected]
For additional commands, e-mail: [email protected]