Great !
The patch work fine the listing of folders.
However the type is still 2. The type is initialized in the
constructor so the added code for setting the type is not executed.
I think the following in getFolders
int etype = entry.isNoinferiors() ?
Folder.HOLDS_MESSAGES :
Folder.HOLDS_FOLDERS;
should be replaced with
int etype = Folder.HOLDS_FOLDERS | Folder.HOLDS_MESSAGES;
as this is only called from the listing function and creates only
valid mailboxes.
Ciao,
Cedric
Le 15 févr. 06 à 20:19, Chris Burdess a écrit :
Cedric Hyppolite wrote:
I used tcpflow with Gnu provider. Sun did take into account the
mail.debug property so I got the command directly.
Sun provider does:
A6 LIST "" "INBOX/%"
* LIST () "/" INBOX/sent-mail
* LIST () "/" INBOX/JXTA
* LIST () "/" INBOX/Pouic
* LIST () "/" INBOX/spam
* LIST () "/" INBOX/NonSpam
* LIST () "/" INBOX/Apple
A6 OK LIST completed
where Gnu provider does:
A10 LIST INBOX %
* LIST () "/" INBOX
A10 OK LIST completed
These should be equivalent according to the IMAP4 spec. However, I
attach a patch against CVS HEAD that should resolve this issue, if
you wouldn't mind testing it.
- Another difference is that Sun provider gives the folder a type
3 (holds folder & messages) where Gnu provider gives a type 2
(holds message).
OK.
- Sun provider throws a FolderNotFoundException on listing of the
personal/user/shared namespace, where Gnu gives an empty array. I
prefers the GNU provider behaviour.
Good
- On the logging problem: I am running under Eclipse, but that
should not prevent logging from working as I use commons-logging
and log4j without problems.
GNU JavaMail uses the standard java.util.logging package which is
not the same as log4j. I don't know how Eclipse handles it,
perhaps you could try running from the command line?
Conclusion:
On the folder type issue, I guess everything (but the root)
should be of type 3 even if there is no 'inferior' folder for now
i.e. the API says for HOLDS_FOLDER: 'This folder CAN contain
other folders'.
I agree. I've also incorporated that algorithm into the patch. Let
me know if this solves your problems, if so I will commit it.
--
犬 Chris Burdess
"They that can give up essential liberty to obtain a little safety
deserve neither liberty nor safety." - Benjamin Franklin
<patch>