Uploaded image for project: 'James Mailbox'
  1. James Mailbox
  2. MAILBOX-179

Optimizes SimpleMessage::getFullContent()

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • 0.3
    • 0.4
    • store
    • None
    • n/a

    Description

      Currently the base class of SimpleMesage, "AbstractSomethingOrAnother" has a "getFullContent" method which creates a Sequenced Stream, using getHeader & getBody.

      This is unnecessary in SimpleMessage, as the content stream is available in the private variables.

      ----------

      Index: src/main/java/org/apache/james/mailbox/store/mail/model/impl/SimpleMessage.java
      ===================================================================
      — src/main/java/org/apache/james/mailbox/store/mail/model/impl/SimpleMessage.java (revision 1345622)
      +++ src/main/java/org/apache/james/mailbox/store/mail/model/impl/SimpleMessage.java (working copy)
      @@ -96,6 +96,10 @@
      }
      }

      + @Override
      + public InputStream getFullContent() throws IOException

      { + return content.newStream(0, -1); + }

      public Date getInternalDate() {
      return internalDate;

      Attachments

        Activity

          People

            eric@apache.org Eric Charles
            timprepscius Timothy Prepscius
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: