You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by "Timothy Prepscius (JIRA)" <ji...@apache.org> on 2012/06/04 15:38:23 UTC

[jira] [Created] (MAILBOX-179) Optimizes SimpleMessage::getFullContent()

Timothy Prepscius created MAILBOX-179:
-----------------------------------------

             Summary: 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


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.



--
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


[jira] [Resolved] (MAILBOX-179) Optimizes SimpleMessage::getFullContent()

Posted by "Eric Charles (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAILBOX-179?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Charles resolved MAILBOX-179.
----------------------------------

    Resolution: Fixed
      Assignee: Eric Charles

Commited in trunk. Thx Timothy.
                
> 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
>            Assignee: Eric Charles
>            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


[jira] [Updated] (MAILBOX-179) Optimizes SimpleMessage::getFullContent()

Posted by "Timothy Prepscius (JIRA)" <ji...@apache.org>.
     [ 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


[jira] [Commented] (MAILBOX-179) Optimizes SimpleMessage::getFullContent()

Posted by "Eric Charles (JIRA)" <ji...@apache.org>.
    [ 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: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org