[
https://issues.apache.org/jira/browse/MAILBOX-179?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13290887#comment-13290887
]
Eric Charles commented on MAILBOX-179:
--------------------------------------
Good catch Tim.
I will commit and also add a unit test for simplemessage
> Optimizes SimpleMessage::getFullContent()
> -----------------------------------------
>
> Key: MAILBOX-179
> URL: https://issues.apache.org/jira/browse/MAILBOX-179
> Project: James Mailbox
> Issue Type: Improvement
> Components: store
> Affects Versions: 0.3
> Environment: n/a
> Reporter: Timothy Prepscius
> Priority: Trivial
> Fix For: 0.4
>
> Original Estimate: 0h
> Remaining Estimate: 0h
>
> 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;
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]