james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rdon...@apache.org
Subject svn commit: r644833 - in /james/server/trunk: experimental-seda-imap-function/src/main/java/org/apache/james/experimental/imapserver/ imap-api/src/main/java/org/apache/james/api/imap/display/ imap-codec-library/src/main/java/org/apache/james/imap/messa...
Date Fri, 04 Apr 2008 19:17:10 GMT
Author: rdonkin
Date: Fri Apr  4 12:17:08 2008
New Revision: 644833

URL: http://svn.apache.org/viewvc?rev=644833&view=rev
Log:
Replaced old deprecated message

Removed:
    james/server/trunk/imap-codec-library/src/main/java/org/apache/james/imap/message/response/imap4rev1/legacy/CommandFailedResponse.java
    james/server/trunk/imap-codec-library/src/main/java/org/apache/james/imapserver/codec/encode/imap4rev1/legacy/CommandFailedResponseEncoder.java
    james/server/trunk/imap-codec-library/src/test/java/org/apache/james/imapserver/codec/encode/imap4rev1/legacy/CommandFailedResponseEncoderTest.java
Modified:
    james/server/trunk/experimental-seda-imap-function/src/main/java/org/apache/james/experimental/imapserver/ImapHandler.java
    james/server/trunk/imap-api/src/main/java/org/apache/james/api/imap/display/HumanReadableTextKey.java
    james/server/trunk/imap-codec-library/src/main/java/org/apache/james/imapserver/codec/encode/main/DefaultImapEncoderFactory.java
    james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/base/AbstractImapRequestProcessor.java

Modified: james/server/trunk/experimental-seda-imap-function/src/main/java/org/apache/james/experimental/imapserver/ImapHandler.java
URL: http://svn.apache.org/viewvc/james/server/trunk/experimental-seda-imap-function/src/main/java/org/apache/james/experimental/imapserver/ImapHandler.java?rev=644833&r1=644832&r2=644833&view=diff
==============================================================================
--- james/server/trunk/experimental-seda-imap-function/src/main/java/org/apache/james/experimental/imapserver/ImapHandler.java
(original)
+++ james/server/trunk/experimental-seda-imap-function/src/main/java/org/apache/james/experimental/imapserver/ImapHandler.java
Fri Apr  4 12:17:08 2008
@@ -191,7 +191,7 @@
     }
     
     /**
-     * Method which will be colled on error
+     * Method which will be called on error
      *  
      * @param e the RuntimeException
      */

Modified: james/server/trunk/imap-api/src/main/java/org/apache/james/api/imap/display/HumanReadableTextKey.java
URL: http://svn.apache.org/viewvc/james/server/trunk/imap-api/src/main/java/org/apache/james/api/imap/display/HumanReadableTextKey.java?rev=644833&r1=644832&r2=644833&view=diff
==============================================================================
--- james/server/trunk/imap-api/src/main/java/org/apache/james/api/imap/display/HumanReadableTextKey.java
(original)
+++ james/server/trunk/imap-api/src/main/java/org/apache/james/api/imap/display/HumanReadableTextKey.java
Fri Apr  4 12:17:08 2008
@@ -54,6 +54,10 @@
     = new HumanReadableTextKey("org.apache.james.imap.GENERIC_SUBSCRIPTION_FAILURE", 
     "Cannot subscribe."); 
     
+    public static final HumanReadableTextKey INVALID_COMMAND 
+    = new HumanReadableTextKey("org.apache.james.imap.INVALID_COMMAND", 
+            "failed. Command not valid in this state.");
+    
     public static final HumanReadableTextKey FAILURE_MAIL_PARSE 
     = new HumanReadableTextKey("org.apache.james.imap.FAILURE_MAIL_PARSE", 
             "failed. Mail cannot be parsed.");
@@ -62,6 +66,9 @@
         = new HumanReadableTextKey("org.apache.james.imap.FAILURE_NO_SUCH_MAILBOX", 
                 "failed. No such mailbox.");
     
+    public static final HumanReadableTextKey GENERIC_FAILURE_DURING_PROCESSING
+        = new HumanReadableTextKey("org.apache.james.imap.GENERIC_FAILURE_DURING_PROCESSING",

+            "processing failed.");
     
     public static final HumanReadableTextKey FAILURE_MAILBOX_EXISTS
         = new HumanReadableTextKey("org.apache.james.imap.FAILURE_NO_SUCH_MAILBOX", 

Modified: james/server/trunk/imap-codec-library/src/main/java/org/apache/james/imapserver/codec/encode/main/DefaultImapEncoderFactory.java
URL: http://svn.apache.org/viewvc/james/server/trunk/imap-codec-library/src/main/java/org/apache/james/imapserver/codec/encode/main/DefaultImapEncoderFactory.java?rev=644833&r1=644832&r2=644833&view=diff
==============================================================================
--- james/server/trunk/imap-codec-library/src/main/java/org/apache/james/imapserver/codec/encode/main/DefaultImapEncoderFactory.java
(original)
+++ james/server/trunk/imap-codec-library/src/main/java/org/apache/james/imapserver/codec/encode/main/DefaultImapEncoderFactory.java
Fri Apr  4 12:17:08 2008
@@ -30,7 +30,6 @@
 import org.apache.james.imapserver.codec.encode.imap4rev1.StatusResponseEncoder;
 import org.apache.james.imapserver.codec.encode.imap4rev1.legacy.BadResponseEncoder;
 import org.apache.james.imapserver.codec.encode.imap4rev1.legacy.CapabilityResponseEncoder;
-import org.apache.james.imapserver.codec.encode.imap4rev1.legacy.CommandFailedResponseEncoder;
 import org.apache.james.imapserver.codec.encode.imap4rev1.legacy.ErrorResponseEncoder;
 import org.apache.james.imapserver.codec.encode.imap4rev1.server.LSubResponseEncoder;
 import org.apache.james.imapserver.codec.encode.imap4rev1.server.ListResponseEncoder;
@@ -57,8 +56,7 @@
         final ListResponseEncoder listResponseEncoder = new ListResponseEncoder(lsubResponseEncoder);
         final FlagsResponseEncoder flagsResponseEncoder = new FlagsResponseEncoder(listResponseEncoder);
         final ErrorResponseEncoder errorResponseEncoder = new ErrorResponseEncoder(flagsResponseEncoder);
-        final CommandFailedResponseEncoder commandFailedResponseEncoder = new CommandFailedResponseEncoder(errorResponseEncoder);
-        final CapabilityResponseEncoder capabilityResponseEncoder = new CapabilityResponseEncoder(commandFailedResponseEncoder);
+        final CapabilityResponseEncoder capabilityResponseEncoder = new CapabilityResponseEncoder(errorResponseEncoder);
         final BadResponseEncoder result = new BadResponseEncoder(capabilityResponseEncoder);
         return result;
     }

Modified: james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/base/AbstractImapRequestProcessor.java
URL: http://svn.apache.org/viewvc/james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/base/AbstractImapRequestProcessor.java?rev=644833&r1=644832&r2=644833&view=diff
==============================================================================
--- james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/base/AbstractImapRequestProcessor.java
(original)
+++ james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/base/AbstractImapRequestProcessor.java
Fri Apr  4 12:17:08 2008
@@ -34,7 +34,6 @@
 import org.apache.james.api.imap.message.response.imap4rev1.StatusResponseFactory;
 import org.apache.james.api.imap.process.ImapProcessor;
 import org.apache.james.api.imap.process.ImapSession;
-import org.apache.james.imap.message.response.imap4rev1.legacy.CommandFailedResponse;
 import org.apache.james.mailboxmanager.MailboxExistsException;
 import org.apache.james.mailboxmanager.MailboxNotFoundException;
 
@@ -70,9 +69,10 @@
             response = factory.taggedNo(tag, command, HumanReadableTextKey.FAILURE_NO_SUCH_MAILBOX);
         } else {
             if (logger != null) {
-                logger.debug("error processing command ", e);
+                logger.info(e.getMessage());
+                logger.debug("Processing failed:", e);
             }
-            response = new CommandFailedResponse(command, null, e.getMessage(), tag);
+            response = factory.taggedNo(tag, command, HumanReadableTextKey.GENERIC_FAILURE_DURING_PROCESSING);
         }
         responder.respond(response);
     }
@@ -80,8 +80,7 @@
     final void doProcess(final ImapRequest message,
             final ImapCommand command, final String tag, Responder responder, ImapSession
session) {
         if (!command.validForState(session.getState())) {
-            ImapResponseMessage response = new CommandFailedResponse(command,
-                    "Command not valid in this state.", tag);
+            ImapResponseMessage response = factory.taggedNo(tag, command, HumanReadableTextKey.INVALID_COMMAND);
             responder.respond(response);
             
         } else {



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message