james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n...@apache.org
Subject cvs commit: james-server/proposals/imap2/test/org/apache/james/imapserver CommandParserTest.java
Date Thu, 23 Oct 2003 01:55:13 GMT
noel        2003/10/22 18:55:13

  Modified:    proposals/imap2/java/org/apache/james/imapserver
                        ImapHandler.java ImapHost.java ImapServer.java
                        ImapSession.java JamesImapHost.java
               proposals/imap2/java/org/apache/james/imapserver/commands
                        CommandParser.java CopyCommand.java
                        ExpungeCommand.java StoreCommand.java
                        SubscribeCommand.java UnsubscribeCommand.java
               proposals/imap2/java/org/apache/james/imapserver/store
                        ImapMailbox.java InMemoryStore.java
               proposals/imap2/test/org/apache/james/imapserver
                        CommandParserTest.java
  Log:
  import cleanup, courtesy of Stefano Mazzocchi
  
  Revision  Changes    Path
  1.8       +10 -20    james-server/proposals/imap2/java/org/apache/james/imapserver/ImapHandler.java
  
  Index: ImapHandler.java
  ===================================================================
  RCS file: /home/cvs/james-server/proposals/imap2/java/org/apache/james/imapserver/ImapHandler.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ImapHandler.java	8 Mar 2003 21:13:54 -0000	1.7
  +++ ImapHandler.java	23 Oct 2003 01:55:12 -0000	1.8
  @@ -58,34 +58,24 @@
   
   package org.apache.james.imapserver;
   
  +import java.io.BufferedOutputStream;
  +import java.io.BufferedReader;
  +import java.io.IOException;
  +import java.io.InputStream;
  +import java.io.InputStreamReader;
  +import java.io.OutputStream;
  +import java.io.PrintWriter;
  +import java.net.Socket;
  +
   import org.apache.avalon.cornerstone.services.connection.ConnectionHandler;
   import org.apache.avalon.excalibur.pool.Poolable;
   import org.apache.avalon.framework.activity.Disposable;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
  -import org.apache.avalon.framework.logger.Logger;
  -import org.apache.avalon.framework.logger.LogEnabled;
   import org.apache.james.Constants;
  -import org.apache.james.imapserver.commands.ImapCommand;
  -import org.apache.james.imapserver.commands.ImapCommandFactory;
  -import org.apache.james.imapserver.commands.CommandParser;
  -import org.apache.james.imapserver.store.ImapMailbox;
  -import org.apache.mailet.MailRepository;
  -import org.apache.mailet.User;
  -import org.apache.mailet.UsersRepository;
   import org.apache.james.util.InternetPrintWriter;
   import org.apache.james.util.watchdog.Watchdog;
   import org.apache.james.util.watchdog.WatchdogTarget;
  -
  -import java.io.BufferedOutputStream;
  -import java.io.BufferedReader;
  -import java.io.IOException;
  -import java.io.InputStreamReader;
  -import java.io.OutputStream;
  -import java.io.PrintWriter;
  -import java.io.Writer;
  -import java.io.Reader;
  -import java.io.InputStream;
  -import java.net.Socket;
  +import org.apache.mailet.MailRepository;
   
   /**
    * The handler class for IMAP connections.
  
  
  
  1.8       +4 -5      james-server/proposals/imap2/java/org/apache/james/imapserver/ImapHost.java
  
  Index: ImapHost.java
  ===================================================================
  RCS file: /home/cvs/james-server/proposals/imap2/java/org/apache/james/imapserver/ImapHost.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ImapHost.java	13 Jul 2003 06:04:55 -0000	1.7
  +++ ImapHost.java	23 Oct 2003 01:55:12 -0000	1.8
  @@ -58,12 +58,11 @@
   
   package org.apache.james.imapserver;
   
  -import org.apache.mailet.User;
  +import java.util.Collection;
  +
   import org.apache.james.imapserver.store.ImapMailbox;
   import org.apache.james.imapserver.store.MailboxException;
  -
  -import javax.mail.search.SearchTerm;
  -import java.util.Collection;
  +import org.apache.mailet.User;
   
   /**
    * A host machine that has an IMAP4rev1 messaging server. There should be one
  
  
  
  1.6       +2 -5      james-server/proposals/imap2/java/org/apache/james/imapserver/ImapServer.java
  
  Index: ImapServer.java
  ===================================================================
  RCS file: /home/cvs/james-server/proposals/imap2/java/org/apache/james/imapserver/ImapServer.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ImapServer.java	8 Mar 2003 21:13:54 -0000	1.5
  +++ ImapServer.java	23 Oct 2003 01:55:12 -0000	1.6
  @@ -65,20 +65,17 @@
   import org.apache.avalon.excalibur.pool.Pool;
   import org.apache.avalon.excalibur.pool.Poolable;
   import org.apache.avalon.framework.activity.Initializable;
  -import org.apache.avalon.framework.component.ComponentException;
  -import org.apache.avalon.framework.component.ComponentManager;
  -import org.apache.avalon.framework.component.Composable;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
   import org.apache.avalon.framework.logger.LogEnabled;
  -import org.apache.avalon.framework.service.ServiceManager;
   import org.apache.avalon.framework.service.ServiceException;
  +import org.apache.avalon.framework.service.ServiceManager;
   import org.apache.james.core.AbstractJamesService;
   import org.apache.james.services.MailServer;
  -import org.apache.mailet.UsersRepository;
   import org.apache.james.services.UsersStore;
   import org.apache.james.util.watchdog.Watchdog;
   import org.apache.james.util.watchdog.WatchdogFactory;
  +import org.apache.mailet.UsersRepository;
   
   /**
    * TODO: this is a quick cut-and-paste hack from POP3Server. Should probably be
  
  
  
  1.8       +3 -4      james-server/proposals/imap2/java/org/apache/james/imapserver/ImapSession.java
  
  Index: ImapSession.java
  ===================================================================
  RCS file: /home/cvs/james-server/proposals/imap2/java/org/apache/james/imapserver/ImapSession.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ImapSession.java	21 Jul 2003 23:31:03 -0000	1.7
  +++ ImapSession.java	23 Oct 2003 01:55:12 -0000	1.8
  @@ -58,11 +58,10 @@
   
   package org.apache.james.imapserver;
   
  -import org.apache.avalon.framework.logger.Logger;
  -import org.apache.mailet.User;
  -import org.apache.mailet.UsersRepository;
   import org.apache.james.imapserver.store.ImapMailbox;
   import org.apache.james.imapserver.store.MailboxException;
  +import org.apache.mailet.User;
  +import org.apache.mailet.UsersRepository;
   
   /**
    * Encapsulates all state held for an ongoing Imap session,
  
  
  
  1.11      +8 -9      james-server/proposals/imap2/java/org/apache/james/imapserver/JamesImapHost.java
  
  Index: JamesImapHost.java
  ===================================================================
  RCS file: /home/cvs/james-server/proposals/imap2/java/org/apache/james/imapserver/JamesImapHost.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- JamesImapHost.java	21 Jul 2003 23:31:04 -0000	1.10
  +++ JamesImapHost.java	23 Oct 2003 01:55:12 -0000	1.11
  @@ -58,21 +58,20 @@
   
   package org.apache.james.imapserver;
   
  +import java.util.ArrayList;
  +import java.util.Collection;
  +import java.util.HashMap;
  +import java.util.Iterator;
  +import java.util.Map;
  +import java.util.StringTokenizer;
  +
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
   import org.apache.avalon.framework.logger.ConsoleLogger;
   import org.apache.james.imapserver.store.ImapMailbox;
   import org.apache.james.imapserver.store.ImapStore;
   import org.apache.james.imapserver.store.InMemoryStore;
   import org.apache.james.imapserver.store.MailboxException;
  -import org.apache.james.imapserver.store.SimpleImapMessage;
   import org.apache.mailet.User;
  -
  -import java.util.ArrayList;
  -import java.util.Collection;
  -import java.util.HashMap;
  -import java.util.Iterator;
  -import java.util.Map;
  -import java.util.StringTokenizer;
   
   /**
    * An initial implementation of an ImapHost. By default, uses,
  
  
  
  1.10      +11 -13    james-server/proposals/imap2/java/org/apache/james/imapserver/commands/CommandParser.java
  
  Index: CommandParser.java
  ===================================================================
  RCS file: /home/cvs/james-server/proposals/imap2/java/org/apache/james/imapserver/commands/CommandParser.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- CommandParser.java	21 Jul 2003 23:31:04 -0000	1.9
  +++ CommandParser.java	23 Oct 2003 01:55:12 -0000	1.10
  @@ -58,20 +58,18 @@
   
   package org.apache.james.imapserver.commands;
   
  -import org.apache.james.imapserver.ProtocolException;
  -import org.apache.james.imapserver.ImapRequestLineReader;
  -import org.apache.james.imapserver.ImapConstants;
  -import org.apache.james.imapserver.store.MessageFlags;
  -import org.apache.james.util.Assert;
  -
  -import javax.mail.Flags;
  -import java.util.Date;
  -import java.util.TimeZone;
  -import java.util.List;
  -import java.util.ArrayList;
   import java.text.DateFormat;
  -import java.text.SimpleDateFormat;
   import java.text.ParseException;
  +import java.text.SimpleDateFormat;
  +import java.util.ArrayList;
  +import java.util.Date;
  +
  +import javax.mail.Flags;
  +
  +import org.apache.james.imapserver.ImapConstants;
  +import org.apache.james.imapserver.ImapRequestLineReader;
  +import org.apache.james.imapserver.ProtocolException;
  +import org.apache.james.imapserver.store.MessageFlags;
   
   /**
    *
  
  
  
  1.6       +2 -3      james-server/proposals/imap2/java/org/apache/james/imapserver/commands/CopyCommand.java
  
  Index: CopyCommand.java
  ===================================================================
  RCS file: /home/cvs/james-server/proposals/imap2/java/org/apache/james/imapserver/commands/CopyCommand.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- CopyCommand.java	21 Jul 2003 23:31:04 -0000	1.5
  +++ CopyCommand.java	23 Oct 2003 01:55:12 -0000	1.6
  @@ -61,11 +61,10 @@
   import org.apache.james.imapserver.ImapRequestLineReader;
   import org.apache.james.imapserver.ImapResponse;
   import org.apache.james.imapserver.ImapSession;
  -import org.apache.james.imapserver.ProtocolException;
   import org.apache.james.imapserver.ImapSessionMailbox;
  +import org.apache.james.imapserver.ProtocolException;
   import org.apache.james.imapserver.store.ImapMailbox;
   import org.apache.james.imapserver.store.MailboxException;
  -import org.apache.james.imapserver.store.SimpleImapMessage;
   
   /**
    * Handles processeing for the COPY imap command.
  
  
  
  1.6       +1 -2      james-server/proposals/imap2/java/org/apache/james/imapserver/commands/ExpungeCommand.java
  
  Index: ExpungeCommand.java
  ===================================================================
  RCS file: /home/cvs/james-server/proposals/imap2/java/org/apache/james/imapserver/commands/ExpungeCommand.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ExpungeCommand.java	21 Jul 2003 23:31:04 -0000	1.5
  +++ ExpungeCommand.java	23 Oct 2003 01:55:12 -0000	1.6
  @@ -62,7 +62,6 @@
   import org.apache.james.imapserver.ImapResponse;
   import org.apache.james.imapserver.ImapSession;
   import org.apache.james.imapserver.ProtocolException;
  -import org.apache.james.imapserver.ImapHost;
   import org.apache.james.imapserver.store.ImapMailbox;
   import org.apache.james.imapserver.store.MailboxException;
   
  
  
  
  1.6       +9 -6      james-server/proposals/imap2/java/org/apache/james/imapserver/commands/StoreCommand.java
  
  Index: StoreCommand.java
  ===================================================================
  RCS file: /home/cvs/james-server/proposals/imap2/java/org/apache/james/imapserver/commands/StoreCommand.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- StoreCommand.java	21 Jul 2003 23:31:05 -0000	1.5
  +++ StoreCommand.java	23 Oct 2003 01:55:12 -0000	1.6
  @@ -58,13 +58,16 @@
   
   package org.apache.james.imapserver.commands;
   
  -import org.apache.james.imapserver.*;
  +import javax.mail.Flags;
  +
  +import org.apache.james.imapserver.ImapRequestLineReader;
  +import org.apache.james.imapserver.ImapResponse;
  +import org.apache.james.imapserver.ImapSession;
  +import org.apache.james.imapserver.ImapSessionMailbox;
  +import org.apache.james.imapserver.ProtocolException;
  +import org.apache.james.imapserver.store.MailboxException;
   import org.apache.james.imapserver.store.MessageFlags;
  -import org.apache.james.imapserver.store.ImapMailbox;
   import org.apache.james.imapserver.store.SimpleImapMessage;
  -import org.apache.james.imapserver.store.MailboxException;
  -
  -import javax.mail.Flags;
   
   /**
    * Handles processeing for the STORE imap command.
  
  
  
  1.6       +1 -2      james-server/proposals/imap2/java/org/apache/james/imapserver/commands/SubscribeCommand.java
  
  Index: SubscribeCommand.java
  ===================================================================
  RCS file: /home/cvs/james-server/proposals/imap2/java/org/apache/james/imapserver/commands/SubscribeCommand.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- SubscribeCommand.java	8 Mar 2003 21:13:55 -0000	1.5
  +++ SubscribeCommand.java	23 Oct 2003 01:55:12 -0000	1.6
  @@ -62,7 +62,6 @@
   import org.apache.james.imapserver.ImapResponse;
   import org.apache.james.imapserver.ImapSession;
   import org.apache.james.imapserver.ProtocolException;
  -import org.apache.james.imapserver.store.ImapMailbox;
   import org.apache.james.imapserver.store.MailboxException;
   
   /**
  
  
  
  1.6       +1 -2      james-server/proposals/imap2/java/org/apache/james/imapserver/commands/UnsubscribeCommand.java
  
  Index: UnsubscribeCommand.java
  ===================================================================
  RCS file: /home/cvs/james-server/proposals/imap2/java/org/apache/james/imapserver/commands/UnsubscribeCommand.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- UnsubscribeCommand.java	8 Mar 2003 21:13:55 -0000	1.5
  +++ UnsubscribeCommand.java	23 Oct 2003 01:55:12 -0000	1.6
  @@ -62,7 +62,6 @@
   import org.apache.james.imapserver.ImapResponse;
   import org.apache.james.imapserver.ImapSession;
   import org.apache.james.imapserver.ProtocolException;
  -import org.apache.james.imapserver.store.ImapMailbox;
   import org.apache.james.imapserver.store.MailboxException;
   
   /**
  
  
  
  1.11      +5 -6      james-server/proposals/imap2/java/org/apache/james/imapserver/store/ImapMailbox.java
  
  Index: ImapMailbox.java
  ===================================================================
  RCS file: /home/cvs/james-server/proposals/imap2/java/org/apache/james/imapserver/store/ImapMailbox.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- ImapMailbox.java	21 Jul 2003 23:31:06 -0000	1.10
  +++ ImapMailbox.java	23 Oct 2003 01:55:13 -0000	1.11
  @@ -58,14 +58,13 @@
   
   package org.apache.james.imapserver.store;
   
  -import org.apache.james.core.MailImpl;
  -import org.apache.james.imapserver.commands.IdSet;
  -import org.apache.james.imapserver.commands.IdRange;
  +import java.util.Date;
   
  +import javax.mail.Flags;
   import javax.mail.internet.MimeMessage;
   import javax.mail.search.SearchTerm;
  -import javax.mail.Flags;
  -import java.util.Date;
  +
  +import org.apache.james.core.MailImpl;
   
   /**
    * Represents a mailbox within an {@link org.apache.james.imapserver.store.ImapStore}.
  
  
  
  1.10      +15 -9     james-server/proposals/imap2/java/org/apache/james/imapserver/store/InMemoryStore.java
  
  Index: InMemoryStore.java
  ===================================================================
  RCS file: /home/cvs/james-server/proposals/imap2/java/org/apache/james/imapserver/store/InMemoryStore.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- InMemoryStore.java	21 Jul 2003 23:31:06 -0000	1.9
  +++ InMemoryStore.java	23 Oct 2003 01:55:13 -0000	1.10
  @@ -58,17 +58,23 @@
   
   package org.apache.james.imapserver.store;
   
  -import org.apache.avalon.framework.logger.AbstractLogEnabled;
  -import org.apache.james.core.MailImpl;
  -import org.apache.james.imapserver.ImapConstants;
  -import org.apache.james.imapserver.commands.IdSet;
  -import org.apache.james.imapserver.commands.IdRange;
  +import java.util.ArrayList;
  +import java.util.Collection;
  +import java.util.Collections;
  +import java.util.Date;
  +import java.util.Iterator;
  +import java.util.LinkedList;
  +import java.util.List;
  +import java.util.StringTokenizer;
   
  +import javax.mail.Flags;
  +import javax.mail.MessagingException;
   import javax.mail.internet.MimeMessage;
   import javax.mail.search.SearchTerm;
  -import javax.mail.MessagingException;
  -import javax.mail.Flags;
  -import java.util.*;
  +
  +import org.apache.avalon.framework.logger.AbstractLogEnabled;
  +import org.apache.james.core.MailImpl;
  +import org.apache.james.imapserver.ImapConstants;
   
   /**
    * A simple in-memory implementation of {@link ImapStore}, used for testing
  
  
  
  1.9       +8 -16     james-server/proposals/imap2/test/org/apache/james/imapserver/CommandParserTest.java
  
  Index: CommandParserTest.java
  ===================================================================
  RCS file: /home/cvs/james-server/proposals/imap2/test/org/apache/james/imapserver/CommandParserTest.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- CommandParserTest.java	21 Jul 2003 23:31:06 -0000	1.8
  +++ CommandParserTest.java	23 Oct 2003 01:55:13 -0000	1.9
  @@ -58,25 +58,17 @@
   
   package org.apache.james.imapserver;
   
  -import org.apache.james.imapserver.commands.CommandParser;
  -import org.apache.james.imapserver.commands.IdSet;
  -import org.apache.james.imapserver.commands.IdRange;
  -
  -import junit.framework.TestCase;
  -
  -import java.io.BufferedReader;
  -import java.io.StringReader;
  -import java.io.StringWriter;
  -import java.io.InputStream;
   import java.io.ByteArrayInputStream;
   import java.io.ByteArrayOutputStream;
  +import java.io.InputStream;
   import java.io.UnsupportedEncodingException;
  -import java.util.Date;
  -import java.util.Calendar;
  -import java.util.SimpleTimeZone;
  -import java.util.TimeZone;
   import java.text.SimpleDateFormat;
  -import java.text.DateFormat;
  +import java.util.TimeZone;
  +
  +import junit.framework.TestCase;
  +
  +import org.apache.james.imapserver.commands.CommandParser;
  +import org.apache.james.imapserver.commands.IdRange;
   
   /**
    * Tests for the {@link ImapRequestLineReader}.
  
  
  

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