classpathx-javamail
[Top][All Lists]
Advanced

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

Re: [Classpathx-javamail] [PATCH/FIXED] 3 buglets in current javamail co


From: Adam Heath
Subject: Re: [Classpathx-javamail] [PATCH/FIXED] 3 buglets in current javamail code
Date: Sat, 8 Jun 2002 14:34:08 -0500 (CDT)

On Sat, 8 Jun 2002, dog wrote:

> dixit Adam Heath:
> > Index: source/gnu/mail/handler/MultipartAlternative.java
> > ===================================================================
> > RCS file:
> > /cvsroot/classpathx/mail/source/gnu/mail/handler/MultipartAlternative.java,
> > v
> > retrieving revision 1.1
> > diff -u -r1.1 MultipartAlternative.java
> > --- source/gnu/mail/handler/MultipartAlternative.java       29 Mar 2002 
> > 21:27:46
> > -0000       1.1
> > +++ source/gnu/mail/handler/MultipartAlternative.java       8 Jun 2002 
> > 02:01:35
> > -0000
> > @@ -24,7 +24,7 @@
> >   * type.
> >   */
> >  public final class MultipartAlternative
> > -  extends Application
> > +  extends Multipart
> >  {
> >
> >    /**
> > Index: source/gnu/mail/handler/MultipartMixed.java
> > ===================================================================
> > RCS file:
> > /cvsroot/classpathx/mail/source/gnu/mail/handler/MultipartMixed.java,v
> > retrieving revision 1.1
> > diff -u -r1.1 MultipartMixed.java
> > --- source/gnu/mail/handler/MultipartMixed.java     29 Mar 2002 21:27:46
> > -0000       1.1
> > +++ source/gnu/mail/handler/MultipartMixed.java     8 Jun 2002 02:01:35
> > -0000
> > @@ -24,7 +24,7 @@
> >   * type.
> >   */
> >  public final class MultipartMixed
> > -  extends Application
> > +  extends Multipart
> >  {
> >
> >    /**
> >
> > The patch pretty much speaks for itself.  Without it, any email that has
> > multipart content throws an exception.
> >
> > The details are as follows:
> >
> > Application only handles objects that are byte[].  Since this class
> > isn't, a
> > NullPointerException gets thrown, because the object can't be cast to a
> > byte
> > array.
>
> sorry, you've lost me. why not add the functionality to
> gnu.mail.handler.Multipart, which now serves no purpose?

Um, Multipart doesn't server no purpose.  It's the base class for
MultipartMixed and MultipartAlternative.

But of these classes are very small.  When constructed, they call their
super(Multipart) with the proper content type settings.  And then the super
class(Multipart) does all the work.

I think you mean to say that Application has no purpose.

A multipart mail has several parts in it.  Each part has to be added to the
mail body, separated by a separator.   Application does not know how to do
this.  It only knows how to handle arrays of bytes.

Without this change, all multipart mails have empty bodies.





reply via email to

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