classpathx-javamail
[Top][All Lists]
Advanced

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

Re: [Classpathx-javamail] GnU mBox


From: Chris Burdess
Subject: Re: [Classpathx-javamail] GnU mBox
Date: Thu, 17 Feb 2005 08:57:49 +0000

Countach wrote:
I think that code I gave you has a bug. In MboxFolder.canonicalNameToLocal it first replaces "/" with the local separator, and then compares to "//". This code can never execute.

The lines should be swapped....

Like this.....
       if (name.startsWith("//"))
         {
           rtn = rtn.substring(2);
         }
       String rtn = name.replace('/', File.separatorChar);

Not this....

       String rtn = name.replace('/', File.separatorChar);
       if (name.startsWith("//"))
         {
           rtn = rtn.substring(2);
         }

There's no conflict, because the value of the name variable is not changed during replace(). But I agree it's confusing, so I've changed the implementation of the method accordingly.
--
Chris Burdess





reply via email to

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