Uploaded image for project: 'James Server'
  1. James Server
  2. JAMES-379

MailImpl.duplicate() should also clone attributes and not only the container HashMap

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2.0
    • Fix Version/s: 2.3.0
    • Component/s: James Core
    • Labels:
      None

      Description

      Probably currently we are using only String attributes and Strings are immutable so we never hit the bug. I recently added a complex object to the attributes and I noticed this.

      1. MailImpl.java.duplicatefix.diff
        2 kB
        Stefano Bagnara
      2. MailImplTest.java
        0.9 kB
        Stefano Bagnara

        Activity

        Hide
        noel Noel J. Bergman added a comment -

        Stefano, I've assigned this to myself. Do you have a patch for this that I can apply? If so, please attach.

        Show
        noel Noel J. Bergman added a comment - Stefano, I've assigned this to myself. Do you have a patch for this that I can apply? If so, please attach.
        Hide
        bago Stefano Bagnara added a comment -

        I already coded something but had no time to test it!
        Here is the simple patch.

        I will probably test it the next weekend.

        Show
        bago Stefano Bagnara added a comment - I already coded something but had no time to test it! Here is the simple patch. I will probably test it the next weekend.
        Hide
        bago Stefano Bagnara added a comment -

        Test case for the bug fixed.

        Show
        bago Stefano Bagnara added a comment - Test case for the bug fixed.
        Hide
        noel Noel J. Bergman added a comment -

        Fix applied to SVN.

        Show
        noel Noel J. Bergman added a comment - Fix applied to SVN.
        Hide
        danny@apache.org Danny Angus added a comment -

        Closing issue fixed in released version.

        Show
        danny@apache.org Danny Angus added a comment - Closing issue fixed in released version.

          People

          • Assignee:
            noel Noel J. Bergman
            Reporter:
            bago Stefano Bagnara
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development