james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Timothy Prepscius (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (MAILBOX-179) Optimizes SimpleMessage::getFullContent()
Date Mon, 04 Jun 2012 13:40:23 GMT

     [ https://issues.apache.org/jira/browse/MAILBOX-179?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Timothy Prepscius updated MAILBOX-179:
--------------------------------------

    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;


  was:
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.



    
> 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: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message