Author: norman
Date: Fri Nov 18 17:53:40 2011
New Revision: 1203768

URL: http://svn.apache.org/viewvc?rev=1203768&view=rev
Log:
Throw exception when try to add handlers after handlers are wired

Modified:
    
james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/SMTPProtocolHandlerChain.java

Modified: 
james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/SMTPProtocolHandlerChain.java
URL: 
http://svn.apache.org/viewvc/james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/SMTPProtocolHandlerChain.java?rev=1203768&r1=1203767&r2=1203768&view=diff
==============================================================================
--- 
james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/SMTPProtocolHandlerChain.java
 (original)
+++ 
james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/SMTPProtocolHandlerChain.java
 Fri Nov 18 17:53:40 2011
@@ -112,6 +112,9 @@ public class SMTPProtocolHandlerChain ex
     
 
     private boolean checkForAuth(ProtocolHandler handler) {
+        if (isReadyOnly()) {
+            throw new UnsupportedOperationException("Read-Only");
+        }
         if (handler instanceof AuthHook && !authHandler) {
             if (!add(new AuthCmdHandler())) {
                 return false;



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to