classpathx-javamail
[Top][All Lists]
Advanced

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

[Classpathx-javamail] BUG in classpathx javamail MBOX


From: Countach
Subject: [Classpathx-javamail] BUG in classpathx javamail MBOX
Date: Tue, 19 Apr 2005 13:34:25 +1000
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)


There seems to be a bug in classpathx MBOX handling.

If you pass into the store the URL of the actual MBOX file, then call getDefaultFolder(), it is named "" empty string, which is correct. However when you pass this into the store as store.getFolder("") it passes it to MboxFolder() and then it calls store.getMailRootDir(). In this function it has the commentary:

  // If the url used to contruct the store references a file directly,
   // return this file.

However this is not true, because it has the code:

            if (!f.isDirectory())
                 {
                   f = f.getParentFile();
                 }

This means the commentary is wrong, and getFolder("") will not return the default folder, but rather it tries to open the directory and gives an error.

It seems to me the above lines should be removed. If somebody wants to treat a directory as a collection of folders, they will pass the directory in as the URL, and the above code will be unnecessary. And the code as it is, is no good because store.getFolder(store.getDefaultFolder.getFullName()) causes an error when dealing with the actual MBOX file.








reply via email to

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