Re: Which application uses GNU JavaMail ?

Cedric Hyppolite <[email protected]> Wed, 15 Feb 2006 21:08:18 +0100
Newsgroups gmane.comp.java.classpath.extensions.discuss
Message-ID <[email protected]>
Great !
The patch work fine the listing of folders.

However the type is still 2. The type is initialized in the =20
constructor so the added code for setting the type is not executed.

I think the following in getFolders

        int etype =3D entry.isNoinferiors() ?
           Folder.HOLDS_MESSAGES :
           Folder.HOLDS_FOLDERS;
should be replaced with
        int etype =3D Folder.HOLDS_FOLDERS | Folder.HOLDS_MESSAGES;

as this is only called from the listing function and creates only =20
valid mailboxes.

Ciao,
Cedric

Le 15 f=C3=A9vr. 06 =C3=A0 20:19, Chris Burdess a =C3=A9crit :

> Cedric Hyppolite wrote:
>> I used tcpflow with Gnu provider. Sun did take into account the =20
>> 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 =20
> attach a patch against CVS HEAD that should resolve this issue, if =20
> you wouldn't mind testing it.
>
>> - Another difference is that Sun provider gives the folder a type =20
>> 3 (holds folder & messages) where Gnu provider gives a type 2 =20
>> (holds message).
>
> OK.
>
>> - Sun provider throws a FolderNotFoundException on listing of the =20
>> personal/user/shared namespace, where Gnu gives an empty array. I =20
>> prefers the GNU provider behaviour.
>
> Good
>
>> - On the logging problem: I am running under Eclipse, but that =20
>> should not prevent logging from working as I use commons-logging =20
>> and log4j without problems.
>
> GNU JavaMail uses the standard java.util.logging package which is =20
> not the same as log4j. I don't know how Eclipse handles it, perhaps =20=

> you could try running from the command line?
>
>> Conclusion:
>> On the folder type issue, I guess everything (but the root) should =20=

>> be of type 3 even if there is no 'inferior' folder for now i.e. =20
>> the API says for HOLDS_FOLDER: 'This folder CAN contain other =20
>> folders'.
>
> I agree. I've also incorporated that algorithm into the patch. Let =20
> me know if this solves your problems, if so I will commit it.
> --=20
> =E7=8A=AC Chris Burdess
>   "They that can give up essential liberty to obtain a little safety
>   deserve neither liberty nor safety." - Benjamin Franklin
>
> <patch>
>