classpathx-javamail
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Classpathx-javamail] MethodMaildirFolder.appendMessagesOptimization


From: Conrad T. Pino
Subject: Re: [Classpathx-javamail] MethodMaildirFolder.appendMessagesOptimizations
Date: Sat, 18 Jan 2014 19:02:52 -0800

> On Behalf Of Chris Burdess
> Sent: Saturday, January 18, 2014 10:25
> 
> > The principle set forth is sound and IMO worth repeating in similar 
> > cases. Shall the project consent to a general application or is a 
> > prior case by case review preferred?
> 
> I'm happy for it to be applied generally.

MboxFolder class implements appendMessages in nearly identical manner, lines
603, 607.

Multipart class has 2 addBodyPart methods where inner block seems
preferable, lines 179, 186, 201, 208.

IMAPStore class has synchronized close method worthy of full review (see
below).

Conrad Pino

   301    /**
   302     * Closes the connection.
   303     */
*  304    public synchronized void close()
   305      throws MessagingException
   306    {
   307      if (connection != null)
   308        {
|  309          synchronized (this)
|  310            {
|  311              try
|  312                {
|  313                  IMAPAdapter callback = this.new
DefaultAdapter(null);
|  314                  connection.logout(callback);
|  315                }
|  316              catch (IOException e)
|  317                {
|  318                }
|  319              connection = null;
|  320            }
   321        }
   322      super.close();
   323    }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]