Re: Parsing a MimeMultipart :: Test case

Chris Burdess <[email protected]> Fri, 18 May 2007 14:54:57 +0100
Newsgroups gmane.comp.java.classpath.extensions.javamail
Message-ID <[email protected]>
remi__ wrote:
> Here is an "avenue":
>
> I ve been debuggin the parseMultiPart and parseBodyPart methods of
> IMAPMessage.
> Here is what I see in parseBodyPart :
>
> list is [TEXT, PLAIN, [NAME, file], NIL, NIL, base64, 2516, 33, NIL,
> [attachment, [FILENAME, file]]]
> its size is 10
>
> String encoding = parseAtom(list.get(BS_ENCODING + extensionCount));
>
> with
> BS_ENCODING = 5 (it is a constant)
> and
> extensionCount = list.size() - 8 = 2
>
> so encoding is the 8th value of the list, which is 33
>
> I would have expected extensionCount to be 0 so that we get the 6th  
> value of
> the list...
>
> What I really don t get is what that does not happen when you  
> execute it...

You must be working from version 1.1 or earlier of gnumail. You need  
to update to the current version (1.1.2).