James Server
  1. James Server
  2. JAMES-240

LinearProcessor.verifyMailAddresses should catch java.lang.ArrayStoreException

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.0
    • Fix Version/s: 2.2.0
    • Labels:
      None

      Description

      From: "Noel J. Bergman" <noel@devtech.com> Save Address
      To: "James Users List" <server-user@james.apache.org>, <angel@sayrix.com>
      CC:
      Date: Wed, 31 Mar 2004 09:32:20 -0500
      Subject: RE: using MailetContext.sendMail
      > java.lang.ClassCastException
      > at
      org.apache.mailet.GenericRecipientMatcher.match(GenericRecipientMatcher.java
      :89)

      89 MailAddress rec = (MailAddress) i.next();

      Looks like something was put into the Collection that doesn't belong there.
      This is later confirmed by:

      > java.lang.ArrayStoreException
      > at java.lang.System.arraycopy(Native Method)
      > at java.util.ArrayList.toArray(ArrayList.java:305)
      > at
      org.apache.james.transport.LinearProcessor.verifyMailAddresses(LinearProcess
      or.java:515)

      515 MailAddress addresses[] = (MailAddress[])col.toArray(new
      MailAddress[0]);

      Please submit a JIRA issue that .LinearProcessor.verifyMailAddresses should
      catch java.lang.ArrayStoreException The purpose of that method is to
      verify the contents of the Collection, and it should not leak the exception.

      — Noel

        Activity

        Hide
        Noel J. Bergman added a comment -

        Added a catch clause for ArrayStoreException to LinearProcessor.verifyMailAddresses.

        Show
        Noel J. Bergman added a comment - Added a catch clause for ArrayStoreException to LinearProcessor.verifyMailAddresses.

          People

          • Assignee:
            Noel J. Bergman
            Reporter:
            Angel Angelov
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development