james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rdon...@apache.org
Subject svn commit: r756488 - in /james/protocols/imap/trunk/decode/src: main/java/org/apache/james/imap/decode/ main/java/org/apache/james/imap/decode/base/ main/java/org/apache/james/imap/decode/main/ main/java/org/apache/james/imap/decode/parser/ test/java/...
Date Fri, 20 Mar 2009 14:41:23 GMT
Author: rdonkin
Date: Fri Mar 20 14:41:22 2009
New Revision: 756488

URL: http://svn.apache.org/viewvc?rev=756488&view=rev
Log:
Inject logger into decode IMAP-75 https://issues.apache.org/jira/browse/IMAP-75

Modified:
    james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/ImapCommandParser.java
    james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/base/AbstractImapCommandParser.java
    james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/main/DefaultImapDecoder.java
    james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/AbstractUidCommandParser.java
    james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/AppendCommandParser.java
    james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/AuthenticateCommandParser.java
    james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/CapabilityCommandParser.java
    james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/CheckCommandParser.java
    james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/CloseCommandParser.java
    james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/CopyCommandParser.java
    james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/CreateCommandParser.java
    james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/DeleteCommandParser.java
    james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/ExamineCommandParser.java
    james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/ExpungeCommandParser.java
    james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/FetchCommandParser.java
    james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/ListCommandParser.java
    james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/LoginCommandParser.java
    james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/LogoutCommandParser.java
    james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/NoopCommandParser.java
    james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/RenameCommandParser.java
    james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/SearchCommandParser.java
    james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/SelectCommandParser.java
    james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/StatusCommandParser.java
    james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/StoreCommandParser.java
    james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/SubscribeCommandParser.java
    james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/UidCommandParser.java
    james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/UnsubscribeCommandParser.java
    james/protocols/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/FetchCommandParserPartialFetchTest.java
    james/protocols/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/SearchCommandParserCharsetTest.java
    james/protocols/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/SearchCommandParserQuotedCharsetTest.java
    james/protocols/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/StoreCommandParserTest.java

Modified: james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/ImapCommandParser.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/ImapCommandParser.java?rev=756488&r1=756487&r2=756488&view=diff
==============================================================================
--- james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/ImapCommandParser.java (original)
+++ james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/ImapCommandParser.java Fri Mar 20 14:41:22 2009
@@ -19,6 +19,7 @@
 
 package org.apache.james.imap.decode;
 
+import org.apache.commons.logging.Log;
 import org.apache.james.imap.api.ImapMessage;
 
 /**
@@ -35,9 +36,9 @@
      * 
      * @param request
      *            <code>ImapRequestLineReader</code>, not null
-     * @param tag
-     *            TODO
+     * @param tag not null
+     * @param logger context sensitive log, not null
      * @return <code>ImapCommandMessage</code>
      */
-    ImapMessage parse(ImapRequestLineReader request, String tag);
+    ImapMessage parse(ImapRequestLineReader request, String tag, Log logger);
 }

Modified: james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/base/AbstractImapCommandParser.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/base/AbstractImapCommandParser.java?rev=756488&r1=756487&r2=756488&view=diff
==============================================================================
--- james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/base/AbstractImapCommandParser.java (original)
+++ james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/base/AbstractImapCommandParser.java Fri Mar 20 14:41:22 2009
@@ -33,7 +33,7 @@
 
 import javax.mail.Flags;
 
-import org.apache.james.imap.api.AbstractLogEnabled;
+import org.apache.commons.logging.Log;
 import org.apache.james.imap.api.Imap4Rev1MessageFactory;
 import org.apache.james.imap.api.ImapCommand;
 import org.apache.james.imap.api.ImapConstants;
@@ -55,8 +55,7 @@
  * 
  * @version $Revision: 109034 $
  */
-public abstract class AbstractImapCommandParser extends AbstractLogEnabled
-        implements ImapCommandParser, MessagingImapCommandParser {
+public abstract class AbstractImapCommandParser implements ImapCommandParser, MessagingImapCommandParser {
     private static final int QUOTED_BUFFER_INITIAL_CAPACITY = 64;
 
     private static final Charset US_ASCII = Charset.forName("US-ASCII");
@@ -109,16 +108,15 @@
      *            <code>ImapRequestLineReader</code>, not null
      * @return <code>ImapCommandMessage</code>, not null
      */
-    public final ImapMessage parse(ImapRequestLineReader request, String tag) {
+    public final ImapMessage parse(ImapRequestLineReader request, String tag, Log logger) {
         ImapMessage result;
         try {
 
-            ImapMessage message = decode(command, request, tag);
-            setupLogger(message);
+            ImapMessage message = decode(command, request, tag, logger);
             result = message;
 
         } catch (ProtocolException e) {
-            getLog().debug("Cannot parse protocol ", e);
+            logger.debug("Cannot parse protocol ", e);
             result = messageFactory.taggedBad(tag, command,
                     HumanReadableTextKey.ILLEGAL_ARGUMENTS);
         }
@@ -127,18 +125,19 @@
 
     /**
      * Parses a request into a command message for later processing.
-     * 
+     * @param command
+     *            <code>ImapCommand</code> to be parsed, not null
      * @param request
      *            <code>ImapRequestLineReader</code>, not null
      * @param tag command tag, not null
-     * @param command
-     *            <code>ImapCommand</code> to be parsed, not null
+     * @param logger TODO
+     * @param logger TODO
      * @return <code>ImapCommandMessage</code>, not null
      * @throws ProtocolException
      *             if the request cannot be parsed
      */
     protected abstract ImapMessage decode(ImapCommand command,
-            ImapRequestLineReader request, String tag) throws ProtocolException;
+            ImapRequestLineReader request, String tag, Log logger) throws ProtocolException;
 
     /**
      * Reads an argument of type "atom" from the request.

Modified: james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/main/DefaultImapDecoder.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/main/DefaultImapDecoder.java?rev=756488&r1=756487&r2=756488&view=diff
==============================================================================
--- james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/main/DefaultImapDecoder.java (original)
+++ james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/main/DefaultImapDecoder.java Fri Mar 20 14:41:22 2009
@@ -19,7 +19,6 @@
 package org.apache.james.imap.decode.main;
 
 import org.apache.commons.logging.Log;
-import org.apache.james.imap.api.AbstractLogEnabled;
 import org.apache.james.imap.api.Imap4Rev1MessageFactory;
 import org.apache.james.imap.api.ImapMessage;
 import org.apache.james.imap.api.ImapSessionState;
@@ -32,8 +31,7 @@
 import org.apache.james.imap.decode.ProtocolException;
 import org.apache.james.imap.decode.base.AbstractImapCommandParser;
 
-public class DefaultImapDecoder extends AbstractLogEnabled implements
-        ImapDecoder {
+public class DefaultImapDecoder implements ImapDecoder {
 
     private final Imap4Rev1MessageFactory messageFactory;
 
@@ -44,15 +42,10 @@
         this.messageFactory = messageFactory;
         this.imapCommands = imapCommands;
     }
-
-    public void setLog(Log logger) {
-        super.setLog(logger);
-        setupLogger(imapCommands);
-    }
-
+    
     public ImapMessage decode(ImapRequestLineReader request, ImapSession session) {
         ImapMessage message;
-        final Log logger = getLog();
+        final Log logger = session.getLog();
 
         try {
             final String tag = AbstractImapCommandParser.tag(request);
@@ -113,7 +106,7 @@
             logger.info("Missing command implementation.");
             message = unknownCommand(tag, session);
         } else {
-            message = command.parse(request, tag);
+            message = command.parse(request, tag, logger);
         }
         return message;
     }

Modified: james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/AbstractUidCommandParser.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/AbstractUidCommandParser.java?rev=756488&r1=756487&r2=756488&view=diff
==============================================================================
--- james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/AbstractUidCommandParser.java (original)
+++ james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/AbstractUidCommandParser.java Fri Mar 20 14:41:22 2009
@@ -19,6 +19,7 @@
 
 package org.apache.james.imap.decode.parser;
 
+import org.apache.commons.logging.Log;
 import org.apache.james.imap.api.ImapCommand;
 import org.apache.james.imap.api.ImapMessage;
 import org.apache.james.imap.decode.ImapRequestLineReader;
@@ -31,19 +32,19 @@
     }
 
     protected ImapMessage decode(ImapCommand command,
-            ImapRequestLineReader request, String tag) throws ProtocolException {
-        final ImapMessage result = decode(command, request, tag, false);
+            ImapRequestLineReader request, String tag, Log logger) throws ProtocolException {
+        final ImapMessage result = decode(command, request, tag, false, logger);
         return result;
     }
 
     public ImapMessage decode(ImapRequestLineReader request, String tag,
-            boolean useUids) throws ProtocolException {
+            boolean useUids, Log logger) throws ProtocolException {
         final ImapCommand command = getCommand();
-        final ImapMessage result = decode(command, request, tag, useUids);
+        final ImapMessage result = decode(command, request, tag, useUids, logger);
         return result;
     }
 
     protected abstract ImapMessage decode(ImapCommand command,
-            ImapRequestLineReader request, String tag, boolean useUids)
+            ImapRequestLineReader request, String tag, boolean useUids, Log logger)
             throws ProtocolException;
 }

Modified: james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/AppendCommandParser.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/AppendCommandParser.java?rev=756488&r1=756487&r2=756488&view=diff
==============================================================================
--- james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/AppendCommandParser.java (original)
+++ james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/AppendCommandParser.java Fri Mar 20 14:41:22 2009
@@ -22,6 +22,7 @@
 
 import javax.mail.Flags;
 
+import org.apache.commons.logging.Log;
 import org.apache.james.imap.api.Imap4Rev1CommandFactory;
 import org.apache.james.imap.api.Imap4Rev1MessageFactory;
 import org.apache.james.imap.api.ImapCommand;
@@ -75,7 +76,7 @@
     }
 
     protected ImapMessage decode(ImapCommand command,
-            ImapRequestLineReader request, String tag) throws ProtocolException {
+            ImapRequestLineReader request, String tag, Log logger) throws ProtocolException {
         String mailboxName = mailbox(request);
         Flags flags = optionalAppendFlags(request);
         if (flags == null) {

Modified: james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/AuthenticateCommandParser.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/AuthenticateCommandParser.java?rev=756488&r1=756487&r2=756488&view=diff
==============================================================================
--- james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/AuthenticateCommandParser.java (original)
+++ james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/AuthenticateCommandParser.java Fri Mar 20 14:41:22 2009
@@ -18,6 +18,7 @@
  ****************************************************************/
 package org.apache.james.imap.decode.parser;
 
+import org.apache.commons.logging.Log;
 import org.apache.james.imap.api.Imap4Rev1CommandFactory;
 import org.apache.james.imap.api.Imap4Rev1MessageFactory;
 import org.apache.james.imap.api.ImapCommand;
@@ -42,7 +43,7 @@
     }
 
     protected ImapMessage decode(ImapCommand command,
-            ImapRequestLineReader request, String tag) throws ProtocolException {
+            ImapRequestLineReader request, String tag, Log logger) throws ProtocolException {
         String authType = astring(request);
         endLine(request);
         final Imap4Rev1MessageFactory factory = getMessageFactory();

Modified: james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/CapabilityCommandParser.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/CapabilityCommandParser.java?rev=756488&r1=756487&r2=756488&view=diff
==============================================================================
--- james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/CapabilityCommandParser.java (original)
+++ james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/CapabilityCommandParser.java Fri Mar 20 14:41:22 2009
@@ -18,6 +18,7 @@
  ****************************************************************/
 package org.apache.james.imap.decode.parser;
 
+import org.apache.commons.logging.Log;
 import org.apache.james.imap.api.Imap4Rev1CommandFactory;
 import org.apache.james.imap.api.Imap4Rev1MessageFactory;
 import org.apache.james.imap.api.ImapCommand;
@@ -42,7 +43,7 @@
     }
 
     protected ImapMessage decode(ImapCommand command,
-            ImapRequestLineReader request, String tag) throws ProtocolException {
+            ImapRequestLineReader request, String tag, Log logger) throws ProtocolException {
         endLine(request);
         final Imap4Rev1MessageFactory factory = getMessageFactory();
         final ImapMessage result = factory

Modified: james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/CheckCommandParser.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/CheckCommandParser.java?rev=756488&r1=756487&r2=756488&view=diff
==============================================================================
--- james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/CheckCommandParser.java (original)
+++ james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/CheckCommandParser.java Fri Mar 20 14:41:22 2009
@@ -18,6 +18,7 @@
  ****************************************************************/
 package org.apache.james.imap.decode.parser;
 
+import org.apache.commons.logging.Log;
 import org.apache.james.imap.api.Imap4Rev1CommandFactory;
 import org.apache.james.imap.api.ImapCommand;
 import org.apache.james.imap.api.ImapMessage;
@@ -41,7 +42,7 @@
     }
 
     protected ImapMessage decode(ImapCommand command,
-            ImapRequestLineReader request, String tag) throws ProtocolException {
+            ImapRequestLineReader request, String tag, Log logger) throws ProtocolException {
         endLine(request);
         final ImapMessage result = getMessageFactory().createCheckMessage(
                 command, tag);

Modified: james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/CloseCommandParser.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/CloseCommandParser.java?rev=756488&r1=756487&r2=756488&view=diff
==============================================================================
--- james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/CloseCommandParser.java (original)
+++ james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/CloseCommandParser.java Fri Mar 20 14:41:22 2009
@@ -18,6 +18,7 @@
  ****************************************************************/
 package org.apache.james.imap.decode.parser;
 
+import org.apache.commons.logging.Log;
 import org.apache.james.imap.api.Imap4Rev1CommandFactory;
 import org.apache.james.imap.api.Imap4Rev1MessageFactory;
 import org.apache.james.imap.api.ImapCommand;
@@ -42,7 +43,7 @@
     }
 
     protected ImapMessage decode(ImapCommand command,
-            ImapRequestLineReader request, String tag) throws ProtocolException {
+            ImapRequestLineReader request, String tag, Log logger) throws ProtocolException {
         endLine(request);
         final Imap4Rev1MessageFactory factory = getMessageFactory();
         final ImapMessage result = factory.createCloseMessage(command, tag);

Modified: james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/CopyCommandParser.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/CopyCommandParser.java?rev=756488&r1=756487&r2=756488&view=diff
==============================================================================
--- james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/CopyCommandParser.java (original)
+++ james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/CopyCommandParser.java Fri Mar 20 14:41:22 2009
@@ -18,6 +18,7 @@
  ****************************************************************/
 package org.apache.james.imap.decode.parser;
 
+import org.apache.commons.logging.Log;
 import org.apache.james.imap.api.Imap4Rev1CommandFactory;
 import org.apache.james.imap.api.ImapCommand;
 import org.apache.james.imap.api.ImapMessage;
@@ -41,7 +42,7 @@
     }
 
     protected ImapMessage decode(ImapCommand command,
-            ImapRequestLineReader request, String tag, boolean useUids)
+            ImapRequestLineReader request, String tag, boolean useUids, Log logger)
             throws ProtocolException {
         IdRange[] idSet = parseIdRange(request);
         String mailboxName = mailbox(request);

Modified: james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/CreateCommandParser.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/CreateCommandParser.java?rev=756488&r1=756487&r2=756488&view=diff
==============================================================================
--- james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/CreateCommandParser.java (original)
+++ james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/CreateCommandParser.java Fri Mar 20 14:41:22 2009
@@ -18,6 +18,7 @@
  ****************************************************************/
 package org.apache.james.imap.decode.parser;
 
+import org.apache.commons.logging.Log;
 import org.apache.james.imap.api.Imap4Rev1CommandFactory;
 import org.apache.james.imap.api.Imap4Rev1MessageFactory;
 import org.apache.james.imap.api.ImapCommand;
@@ -42,7 +43,7 @@
     }
 
     protected ImapMessage decode(ImapCommand command,
-            ImapRequestLineReader request, String tag) throws ProtocolException {
+            ImapRequestLineReader request, String tag, Log logger) throws ProtocolException {
         String mailboxName = mailbox(request);
         endLine(request);
         final Imap4Rev1MessageFactory factory = getMessageFactory();

Modified: james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/DeleteCommandParser.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/DeleteCommandParser.java?rev=756488&r1=756487&r2=756488&view=diff
==============================================================================
--- james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/DeleteCommandParser.java (original)
+++ james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/DeleteCommandParser.java Fri Mar 20 14:41:22 2009
@@ -18,6 +18,7 @@
  ****************************************************************/
 package org.apache.james.imap.decode.parser;
 
+import org.apache.commons.logging.Log;
 import org.apache.james.imap.api.Imap4Rev1CommandFactory;
 import org.apache.james.imap.api.Imap4Rev1MessageFactory;
 import org.apache.james.imap.api.ImapCommand;
@@ -42,7 +43,7 @@
     }
 
     protected ImapMessage decode(ImapCommand command,
-            ImapRequestLineReader request, String tag) throws ProtocolException {
+            ImapRequestLineReader request, String tag, Log logger) throws ProtocolException {
         String mailboxName = mailbox(request);
         endLine(request);
         final Imap4Rev1MessageFactory factory = getMessageFactory();

Modified: james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/ExamineCommandParser.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/ExamineCommandParser.java?rev=756488&r1=756487&r2=756488&view=diff
==============================================================================
--- james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/ExamineCommandParser.java (original)
+++ james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/ExamineCommandParser.java Fri Mar 20 14:41:22 2009
@@ -18,6 +18,7 @@
  ****************************************************************/
 package org.apache.james.imap.decode.parser;
 
+import org.apache.commons.logging.Log;
 import org.apache.james.imap.api.Imap4Rev1CommandFactory;
 import org.apache.james.imap.api.ImapCommand;
 import org.apache.james.imap.api.ImapMessage;
@@ -41,7 +42,7 @@
     }
 
     protected ImapMessage decode(ImapCommand command,
-            ImapRequestLineReader request, String tag) throws ProtocolException {
+            ImapRequestLineReader request, String tag, Log logger) throws ProtocolException {
         final String mailboxName = mailbox(request);
         endLine(request);
         final ImapMessage result = getMessageFactory().createExamineMessage(

Modified: james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/ExpungeCommandParser.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/ExpungeCommandParser.java?rev=756488&r1=756487&r2=756488&view=diff
==============================================================================
--- james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/ExpungeCommandParser.java (original)
+++ james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/ExpungeCommandParser.java Fri Mar 20 14:41:22 2009
@@ -18,6 +18,7 @@
  ****************************************************************/
 package org.apache.james.imap.decode.parser;
 
+import org.apache.commons.logging.Log;
 import org.apache.james.imap.api.Imap4Rev1CommandFactory;
 import org.apache.james.imap.api.Imap4Rev1MessageFactory;
 import org.apache.james.imap.api.ImapCommand;
@@ -42,7 +43,7 @@
     }
 
     protected ImapMessage decode(ImapCommand command,
-            ImapRequestLineReader request, String tag) throws ProtocolException {
+            ImapRequestLineReader request, String tag, Log logger) throws ProtocolException {
         endLine(request);
         final Imap4Rev1MessageFactory factory = getMessageFactory();
         final ImapMessage result = factory.createExpungeMessage(command, tag);

Modified: james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/FetchCommandParser.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/FetchCommandParser.java?rev=756488&r1=756487&r2=756488&view=diff
==============================================================================
--- james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/FetchCommandParser.java (original)
+++ james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/FetchCommandParser.java Fri Mar 20 14:41:22 2009
@@ -20,6 +20,7 @@
 
 import java.util.List;
 
+import org.apache.commons.logging.Log;
 import org.apache.james.imap.api.Imap4Rev1CommandFactory;
 import org.apache.james.imap.api.Imap4Rev1MessageFactory;
 import org.apache.james.imap.api.ImapCommand;
@@ -223,7 +224,7 @@
     }
 
     protected ImapMessage decode(ImapCommand command,
-            ImapRequestLineReader request, String tag, boolean useUids)
+            ImapRequestLineReader request, String tag, boolean useUids, Log logger)
             throws ProtocolException {
         IdRange[] idSet = parseIdRange(request);
         FetchData fetch = fetchRequest(request);

Modified: james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/ListCommandParser.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/ListCommandParser.java?rev=756488&r1=756487&r2=756488&view=diff
==============================================================================
--- james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/ListCommandParser.java (original)
+++ james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/ListCommandParser.java Fri Mar 20 14:41:22 2009
@@ -18,6 +18,7 @@
  ****************************************************************/
 package org.apache.james.imap.decode.parser;
 
+import org.apache.commons.logging.Log;
 import org.apache.james.imap.api.Imap4Rev1CommandFactory;
 import org.apache.james.imap.api.Imap4Rev1MessageFactory;
 import org.apache.james.imap.api.ImapCommand;
@@ -69,7 +70,7 @@
     }
 
     protected ImapMessage decode(ImapCommand command,
-            ImapRequestLineReader request, String tag, boolean useUids)
+            ImapRequestLineReader request, String tag, boolean useUids, Log logger)
             throws ProtocolException {
         String referenceName = mailbox(request);
         String mailboxPattern = listMailbox(request);

Modified: james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/LoginCommandParser.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/LoginCommandParser.java?rev=756488&r1=756487&r2=756488&view=diff
==============================================================================
--- james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/LoginCommandParser.java (original)
+++ james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/LoginCommandParser.java Fri Mar 20 14:41:22 2009
@@ -18,6 +18,7 @@
  ****************************************************************/
 package org.apache.james.imap.decode.parser;
 
+import org.apache.commons.logging.Log;
 import org.apache.james.imap.api.Imap4Rev1CommandFactory;
 import org.apache.james.imap.api.ImapCommand;
 import org.apache.james.imap.api.ImapMessage;
@@ -41,7 +42,7 @@
     }
 
     protected ImapMessage decode(ImapCommand command,
-            ImapRequestLineReader request, String tag) throws ProtocolException {
+            ImapRequestLineReader request, String tag, Log logger) throws ProtocolException {
         final String userid = astring(request);
         final String password = astring(request);
         endLine(request);

Modified: james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/LogoutCommandParser.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/LogoutCommandParser.java?rev=756488&r1=756487&r2=756488&view=diff
==============================================================================
--- james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/LogoutCommandParser.java (original)
+++ james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/LogoutCommandParser.java Fri Mar 20 14:41:22 2009
@@ -18,6 +18,7 @@
  ****************************************************************/
 package org.apache.james.imap.decode.parser;
 
+import org.apache.commons.logging.Log;
 import org.apache.james.imap.api.Imap4Rev1CommandFactory;
 import org.apache.james.imap.api.ImapCommand;
 import org.apache.james.imap.api.ImapMessage;
@@ -41,7 +42,7 @@
     }
 
     protected ImapMessage decode(ImapCommand command,
-            ImapRequestLineReader request, String tag) throws ProtocolException {
+            ImapRequestLineReader request, String tag, Log logger) throws ProtocolException {
         endLine(request);
         final ImapMessage result = getMessageFactory().createLogoutMessage(
                 command, tag);

Modified: james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/NoopCommandParser.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/NoopCommandParser.java?rev=756488&r1=756487&r2=756488&view=diff
==============================================================================
--- james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/NoopCommandParser.java (original)
+++ james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/NoopCommandParser.java Fri Mar 20 14:41:22 2009
@@ -18,6 +18,7 @@
  ****************************************************************/
 package org.apache.james.imap.decode.parser;
 
+import org.apache.commons.logging.Log;
 import org.apache.james.imap.api.Imap4Rev1CommandFactory;
 import org.apache.james.imap.api.ImapCommand;
 import org.apache.james.imap.api.ImapMessage;
@@ -41,7 +42,7 @@
     }
 
     protected ImapMessage decode(ImapCommand command,
-            ImapRequestLineReader request, String tag) throws ProtocolException {
+            ImapRequestLineReader request, String tag, Log logger) throws ProtocolException {
         endLine(request);
         final ImapMessage result = getMessageFactory().createNoopMessage(
                 command, tag);

Modified: james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/RenameCommandParser.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/RenameCommandParser.java?rev=756488&r1=756487&r2=756488&view=diff
==============================================================================
--- james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/RenameCommandParser.java (original)
+++ james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/RenameCommandParser.java Fri Mar 20 14:41:22 2009
@@ -18,6 +18,7 @@
  ****************************************************************/
 package org.apache.james.imap.decode.parser;
 
+import org.apache.commons.logging.Log;
 import org.apache.james.imap.api.Imap4Rev1CommandFactory;
 import org.apache.james.imap.api.ImapCommand;
 import org.apache.james.imap.api.ImapMessage;
@@ -41,7 +42,7 @@
     }
 
     protected ImapMessage decode(ImapCommand command,
-            ImapRequestLineReader request, String tag) throws ProtocolException {
+            ImapRequestLineReader request, String tag, Log logger) throws ProtocolException {
         final String existingName = mailbox(request);
         final String newName = mailbox(request);
         endLine(request);

Modified: james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/SearchCommandParser.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/SearchCommandParser.java?rev=756488&r1=756487&r2=756488&view=diff
==============================================================================
--- james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/SearchCommandParser.java (original)
+++ james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/SearchCommandParser.java Fri Mar 20 14:41:22 2009
@@ -28,6 +28,7 @@
 import java.util.List;
 import java.util.Set;
 
+import org.apache.commons.logging.Log;
 import org.apache.james.imap.api.Imap4Rev1CommandFactory;
 import org.apache.james.imap.api.ImapCommand;
 import org.apache.james.imap.api.ImapMessage;
@@ -947,7 +948,7 @@
     }
 
     protected ImapMessage decode(ImapCommand command,
-            ImapRequestLineReader request, String tag, boolean useUids)
+            ImapRequestLineReader request, String tag, boolean useUids, Log logger)
             throws ProtocolException {
         try {
             // Parse the search term from the request
@@ -957,10 +958,10 @@
                     command, key, useUids, tag);
             return result;
         } catch (IllegalCharsetNameException e) {
-            getLog().debug(e.getMessage());
+            logger.debug(e.getMessage());
             return unsupportedCharset(tag, command);
         } catch (UnsupportedCharsetException e) {
-            getLog().debug(e.getMessage());
+            logger.debug(e.getMessage());
             return unsupportedCharset(tag, command);
         }
     }

Modified: james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/SelectCommandParser.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/SelectCommandParser.java?rev=756488&r1=756487&r2=756488&view=diff
==============================================================================
--- james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/SelectCommandParser.java (original)
+++ james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/SelectCommandParser.java Fri Mar 20 14:41:22 2009
@@ -18,6 +18,7 @@
  ****************************************************************/
 package org.apache.james.imap.decode.parser;
 
+import org.apache.commons.logging.Log;
 import org.apache.james.imap.api.Imap4Rev1CommandFactory;
 import org.apache.james.imap.api.ImapCommand;
 import org.apache.james.imap.api.ImapMessage;
@@ -41,7 +42,7 @@
     }
 
     protected ImapMessage decode(ImapCommand command,
-            ImapRequestLineReader request, String tag) throws ProtocolException {
+            ImapRequestLineReader request, String tag, Log logger) throws ProtocolException {
         final String mailboxName = mailbox(request);
         endLine(request);
         final ImapMessage result = getMessageFactory().createSelectMessage(

Modified: james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/StatusCommandParser.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/StatusCommandParser.java?rev=756488&r1=756487&r2=756488&view=diff
==============================================================================
--- james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/StatusCommandParser.java (original)
+++ james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/StatusCommandParser.java Fri Mar 20 14:41:22 2009
@@ -18,6 +18,7 @@
  ****************************************************************/
 package org.apache.james.imap.decode.parser;
 
+import org.apache.commons.logging.Log;
 import org.apache.james.imap.api.Imap4Rev1CommandFactory;
 import org.apache.james.imap.api.Imap4Rev1MessageFactory;
 import org.apache.james.imap.api.ImapCommand;
@@ -81,7 +82,7 @@
     }
 
     protected ImapMessage decode(ImapCommand command,
-            ImapRequestLineReader request, String tag) throws ProtocolException {
+            ImapRequestLineReader request, String tag, Log logger) throws ProtocolException {
         final String mailboxName = mailbox(request);
         final StatusDataItems statusDataItems = statusDataItems(request);
         endLine(request);

Modified: james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/StoreCommandParser.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/StoreCommandParser.java?rev=756488&r1=756487&r2=756488&view=diff
==============================================================================
--- james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/StoreCommandParser.java (original)
+++ james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/StoreCommandParser.java Fri Mar 20 14:41:22 2009
@@ -20,6 +20,7 @@
 
 import javax.mail.Flags;
 
+import org.apache.commons.logging.Log;
 import org.apache.james.imap.api.Imap4Rev1CommandFactory;
 import org.apache.james.imap.api.ImapCommand;
 import org.apache.james.imap.api.ImapMessage;
@@ -42,7 +43,7 @@
     }
 
     protected ImapMessage decode(ImapCommand command,
-            ImapRequestLineReader request, String tag, boolean useUids)
+            ImapRequestLineReader request, String tag, boolean useUids, Log logger)
             throws ProtocolException {
         final IdRange[] idSet = parseIdRange(request);
         final Boolean sign;

Modified: james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/SubscribeCommandParser.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/SubscribeCommandParser.java?rev=756488&r1=756487&r2=756488&view=diff
==============================================================================
--- james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/SubscribeCommandParser.java (original)
+++ james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/SubscribeCommandParser.java Fri Mar 20 14:41:22 2009
@@ -18,6 +18,7 @@
  ****************************************************************/
 package org.apache.james.imap.decode.parser;
 
+import org.apache.commons.logging.Log;
 import org.apache.james.imap.api.Imap4Rev1CommandFactory;
 import org.apache.james.imap.api.ImapCommand;
 import org.apache.james.imap.api.ImapMessage;
@@ -41,7 +42,7 @@
     }
 
     protected ImapMessage decode(ImapCommand command,
-            ImapRequestLineReader request, String tag) throws ProtocolException {
+            ImapRequestLineReader request, String tag, Log logger) throws ProtocolException {
         final String mailboxName = mailbox(request);
         endLine(request);
 

Modified: james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/UidCommandParser.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/UidCommandParser.java?rev=756488&r1=756487&r2=756488&view=diff
==============================================================================
--- james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/UidCommandParser.java (original)
+++ james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/UidCommandParser.java Fri Mar 20 14:41:22 2009
@@ -18,6 +18,7 @@
  ****************************************************************/
 package org.apache.james.imap.decode.parser;
 
+import org.apache.commons.logging.Log;
 import org.apache.james.imap.api.Imap4Rev1CommandFactory;
 import org.apache.james.imap.api.ImapCommand;
 import org.apache.james.imap.api.ImapMessage;
@@ -59,7 +60,7 @@
     }
 
     protected ImapMessage decode(ImapCommand command,
-            ImapRequestLineReader request, String tag) throws ProtocolException {
+            ImapRequestLineReader request, String tag, Log logger) throws ProtocolException {
         // TODO: check the logic against the specification:
         // TODO: suspect that it is now bust
         // TODO: the command written may be wrong
@@ -74,7 +75,7 @@
                     + "'");
         }
         final AbstractUidCommandParser uidEnabled = (AbstractUidCommandParser) helperCommand;
-        final ImapMessage result = uidEnabled.decode(request, tag, true);
+        final ImapMessage result = uidEnabled.decode(request, tag, true, logger);
         return result;
     }
 

Modified: james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/UnsubscribeCommandParser.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/UnsubscribeCommandParser.java?rev=756488&r1=756487&r2=756488&view=diff
==============================================================================
--- james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/UnsubscribeCommandParser.java (original)
+++ james/protocols/imap/trunk/decode/src/main/java/org/apache/james/imap/decode/parser/UnsubscribeCommandParser.java Fri Mar 20 14:41:22 2009
@@ -18,6 +18,7 @@
  ****************************************************************/
 package org.apache.james.imap.decode.parser;
 
+import org.apache.commons.logging.Log;
 import org.apache.james.imap.api.Imap4Rev1CommandFactory;
 import org.apache.james.imap.api.ImapCommand;
 import org.apache.james.imap.api.ImapMessage;
@@ -41,7 +42,7 @@
     }
 
     protected ImapMessage decode(ImapCommand command,
-            ImapRequestLineReader request, String tag) throws ProtocolException {
+            ImapRequestLineReader request, String tag, Log logger) throws ProtocolException {
         final String mailboxName = mailbox(request);
         endLine(request);
         final ImapMessage result = getMessageFactory()

Modified: james/protocols/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/FetchCommandParserPartialFetchTest.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/FetchCommandParserPartialFetchTest.java?rev=756488&r1=756487&r2=756488&view=diff
==============================================================================
--- james/protocols/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/FetchCommandParserPartialFetchTest.java (original)
+++ james/protocols/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/FetchCommandParserPartialFetchTest.java Fri Mar 20 14:41:22 2009
@@ -85,7 +85,7 @@
             ImapRequestLineReader reader = new ImapRequestLineReader(
                     new ByteArrayInputStream("1 (BODY[]<20.0>)\r\n"
                             .getBytes("US-ASCII")), new ByteArrayOutputStream());
-            parser.decode(command, reader, "A01", false);
+            parser.decode(command, reader, "A01", false, new MockLogger());
             fail("Number of octets must be non-zero");
         } catch (ProtocolException e) {
             // expected
@@ -101,6 +101,6 @@
             oneOf (mockMessageFactory).createFetchMessage( with(equal(command)), with(equal(useUids)), 
                     with(equal(idSet)),with(equal(data)), with(same(tag)));will(returnValue(message));
         }});
-        parser.decode(command, reader, tag, useUids);
+        parser.decode(command, reader, tag, useUids, new MockLogger());
     }
 }

Modified: james/protocols/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/SearchCommandParserCharsetTest.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/SearchCommandParserCharsetTest.java?rev=756488&r1=756487&r2=756488&view=diff
==============================================================================
--- james/protocols/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/SearchCommandParserCharsetTest.java (original)
+++ james/protocols/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/SearchCommandParserCharsetTest.java Fri Mar 20 14:41:22 2009
@@ -88,7 +88,6 @@
         parser.init(mockCommandFactory);
         parser.setMessageFactory(mockMessageFactory);
         parser.setStatusResponseFactory(mockStatusResponseFactory);
-        parser.setLog(new MockLogger());
     }
 
     protected void tearDown() throws Exception {
@@ -113,7 +112,7 @@
         ImapRequestLineReader reader = new ImapRequestLineReader(
                 new ByteArrayInputStream("CHARSET BOGUS ".getBytes("US-ASCII")),
                 new ByteArrayOutputStream());
-        parser.decode(command, reader, TAG, false);
+        parser.decode(command, reader, TAG, false, new MockLogger());
     }
 
     public void testBCCShouldConvertCharset() throws Exception {

Modified: james/protocols/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/SearchCommandParserQuotedCharsetTest.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/SearchCommandParserQuotedCharsetTest.java?rev=756488&r1=756487&r2=756488&view=diff
==============================================================================
--- james/protocols/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/SearchCommandParserQuotedCharsetTest.java (original)
+++ james/protocols/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/SearchCommandParserQuotedCharsetTest.java Fri Mar 20 14:41:22 2009
@@ -152,7 +152,6 @@
         parser.init(mockCommandFactory);
         parser.setMessageFactory(mockMessageFactory);
         parser.setStatusResponseFactory(mockStatusResponseFactory);
-        parser.setLog(new MockLogger());
     }
 
     protected void tearDown() throws Exception {
@@ -199,7 +198,7 @@
         ImapRequestLineReader reader = new ImapRequestLineReader(
                 new ByteArrayInputStream("CHARSET BOGUS ".getBytes("US-ASCII")),
                 new ByteArrayOutputStream());
-        parser.decode(command, reader, TAG, false);
+        parser.decode(command, reader, TAG, false, new MockLogger());
     }
 
     public void testShouldThrowProtocolExceptionWhenBytesAreNotEncodedByCharset()
@@ -209,7 +208,7 @@
                     new ByteArrayInputStream(add("CHARSET US-ASCII BCC "
                             .getBytes("US-ASCII"), BYTES_NON_ASCII_SEARCH_TERM)),
                     new ByteArrayOutputStream());
-            parser.decode(command, reader, TAG, false);
+            parser.decode(command, reader, TAG, false, new MockLogger());
             fail("A protocol exception should be thrown when charset is incompatible with input");
         } catch (ProtocolException e) {
             // expected

Modified: james/protocols/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/StoreCommandParserTest.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/StoreCommandParserTest.java?rev=756488&r1=756487&r2=756488&view=diff
==============================================================================
--- james/protocols/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/StoreCommandParserTest.java (original)
+++ james/protocols/imap/trunk/decode/src/test/java/org/apache/james/imap/decode/parser/StoreCommandParserTest.java Fri Mar 20 14:41:22 2009
@@ -91,6 +91,6 @@
                     with(same(tag))
                     );will(returnValue(message));
         }});
-        parser.decode(command, reader, tag, useUids);
+        parser.decode(command, reader, tag, useUids, new MockLogger());
     }
 }



---------------------------------------------------------------------
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