serge       01/12/05 14:12:26

  Modified:    src/java/org/apache/james/pop3server POP3Handler.java
  Log:
  Renamed getSize to getMessageSize on MailImpl level, and corrected implementation 
bugs accordingly.  Also added check for MimeMessageWrapper so it just gets the size 
without loading the object unnecessarily.
  
  Revision  Changes    Path
  1.3       +5 -5      
jakarta-james/src/java/org/apache/james/pop3server/POP3Handler.java
  
  Index: POP3Handler.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-james/src/java/org/apache/james/pop3server/POP3Handler.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- POP3Handler.java  2001/11/26 03:27:29     1.2
  +++ POP3Handler.java  2001/12/05 22:12:26     1.3
  @@ -110,7 +110,7 @@
        * @exception ProtocolException if an error handling connection occurs
        */
       public void handleConnection( Socket connection )
  -        throws IOException {
  +            throws IOException {
   
           try {
               this.socket = connection;
  @@ -254,7 +254,7 @@
                   for (Enumeration e = userMailbox.elements(); e.hasMoreElements(); ) 
{
                       MailImpl mc = (MailImpl) e.nextElement();
                       if (mc != DELETED) {
  -                        size += mc.getSize();
  +                        size += mc.getMessageSize();
                           count++;
                       }
                   }
  @@ -275,7 +275,7 @@
                       for (Enumeration e = userMailbox.elements(); 
e.hasMoreElements(); ) {
                           MailImpl mc = (MailImpl) e.nextElement();
                           if (mc != DELETED) {
  -                            size += mc.getSize();
  +                            size += mc.getMessageSize();
                               count++;
                           }
                       }
  @@ -284,7 +284,7 @@
                       for (Enumeration e = userMailbox.elements(); 
e.hasMoreElements(); count++) {
                           MailImpl mc = (MailImpl) e.nextElement();
                           if (mc != DELETED) {
  -                            out.println(count + " " + mc.getSize());
  +                            out.println(count + " " + mc.getMessageSize());
                           }
                       }
                       out.println(".");
  @@ -297,7 +297,7 @@
                       num = Integer.parseInt(argument);
                       MailImpl mc = (MailImpl) userMailbox.elementAt(num);
                       if (mc != DELETED) {
  -                        out.println(OK_RESPONSE + " " + num + " " + mc.getSize());
  +                        out.println(OK_RESPONSE + " " + num + " " + 
mc.getMessageSize());
                       } else {
                           out.println(ERR_RESPONSE + " Message (" + num + ") does not 
exist.");
                       }
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to