Bug in MBOX classpathx

Countach <[email protected]>
Newsgroups gmane.comp.java.classpath.extensions.javamail
Message-ID <[email protected]>
Hi,

There is a bug in the MBOX reader such that it blows up if the Date 
header has a trailing space and you call Message.getSentDate().

The problem is in MailDateFormat.parse....

       if (end != len)
          {
            // Timezone
            start = skipWhitespace(text, end + 1);
            end = start + 1;

If it gets to this point it assumes I guess that there must be a 
timezone if there is trailing whitespace. So it calls skipWhitespace, 
the trouble is skipWhitespace doesn't check for end of String, it keeps 
calling charAt(pos) until it runs off the end of the String.

Is there someone more familiar with the code who would care to fix this?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.