Author: norman
Date: Thu Sep 30 13:18:14 2010
New Revision: 1003057
URL: http://svn.apache.org/viewvc?rev=1003057&view=rev
Log:
Remove of trailing delimiter should get handled in create command
Modified:
james/imap/trunk/message/src/main/java/org/apache/james/imap/decode/parser/CreateCommandParser.java
Modified:
james/imap/trunk/message/src/main/java/org/apache/james/imap/decode/parser/CreateCommandParser.java
URL:
http://svn.apache.org/viewvc/james/imap/trunk/message/src/main/java/org/apache/james/imap/decode/parser/CreateCommandParser.java?rev=1003057&r1=1003056&r2=1003057&view=diff
==============================================================================
---
james/imap/trunk/message/src/main/java/org/apache/james/imap/decode/parser/CreateCommandParser.java
(original)
+++
james/imap/trunk/message/src/main/java/org/apache/james/imap/decode/parser/CreateCommandParser.java
Thu Sep 30 13:18:14 2010
@@ -26,6 +26,7 @@ import org.apache.james.imap.api.ImapMes
import org.apache.james.imap.decode.ImapRequestLineReader;
import org.apache.james.imap.decode.DecodingException;
import org.apache.james.imap.decode.base.AbstractImapCommandParser;
+import org.apache.james.mailbox.MailboxConstants;
/**
* Parse CREATE commands
@@ -44,6 +45,13 @@ public class CreateCommandParser extends
protected ImapMessage decode(ImapCommand command,
ImapRequestLineReader request, String tag, Log logger) throws
DecodingException {
String mailboxName = mailbox(request);
+
+ // [email protected]
+ // When mailbox name is suffixed with hierarchy separator
+ // name created must remove tailing delimiter
+ if (mailboxName.endsWith(MailboxConstants.DEFAULT_DELIMITER_STRING)) {
+ mailboxName = mailboxName.substring(0, mailboxName.length() -1);
+ }
endLine(request);
final ImapMessageFactory factory = getMessageFactory();
final ImapMessage result = factory.createCreateMessage(command,
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]