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 "Rafael Munoz (JIRA)" <se...@james.apache.org> on 2008/08/27 17:11:44 UTC
[jira] Created: (JAMES-863) MockMimeMessage bugs
MockMimeMessage bugs
--------------------
Key: JAMES-863
URL: https://issues.apache.org/jira/browse/JAMES-863
Project: James
Issue Type: Bug
Components: Matchers/Mailets (bundled)
Affects Versions: 2.3.1
Reporter: Rafael Munoz
Priority: Minor
I have found a pair of bugs on the MockMimeMessage implementation when using it for my own tests. There very easy to fix and I'm including my proposal code for review.
- MockMimeMessage has a wrong cast on the getFrom method
ORIGINAL
public Address[] getFrom() throws MessagingException {
return (Address[])m_fromAddresses.toArray();
}
FIXED
public Address[] getFrom() throws MessagingException {
return (Address[])m_fromAddresses.toArray(new Address[m_fromAddresses.size()]);
}
- MockMimeMessage doesn't set the mimetype on the setContent method
ORIGINAL
public void setContent(Object object, String mimeType) throws MessagingException {
m_content = object; // trivial implementation
}
FIXED
public void setContent(Object object, String mimeType) throws MessagingException {
m_content = object; // trivial implementation
addHeader(RFC2822Headers.CONTENT_TYPE, mimeType);
}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
[jira] Resolved: (JAMES-863) MockMimeMessage bugs
Posted by "Stefano Bagnara (JIRA)" <se...@james.apache.org>.
[ https://issues.apache.org/jira/browse/JAMES-863?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stefano Bagnara resolved JAMES-863.
-----------------------------------
Resolution: Fixed
Fix Version/s: 3.0
Fixed in trunk
> MockMimeMessage bugs
> --------------------
>
> Key: JAMES-863
> URL: https://issues.apache.org/jira/browse/JAMES-863
> Project: JAMES Server
> Issue Type: Bug
> Components: Matchers/Mailets (bundled)
> Affects Versions: 2.3.1
> Reporter: Rafael Munoz
> Assignee: Stefano Bagnara
> Priority: Minor
> Fix For: 3.0
>
>
> I have found a pair of bugs on the MockMimeMessage implementation when using it for my own tests. There very easy to fix and I'm including my proposal code for review.
> - MockMimeMessage has a wrong cast on the getFrom method
> ORIGINAL
> public Address[] getFrom() throws MessagingException {
> return (Address[])m_fromAddresses.toArray();
> }
> FIXED
> public Address[] getFrom() throws MessagingException {
> return (Address[])m_fromAddresses.toArray(new Address[m_fromAddresses.size()]);
> }
> - MockMimeMessage doesn't set the mimetype on the setContent method
> ORIGINAL
> public void setContent(Object object, String mimeType) throws MessagingException {
> m_content = object; // trivial implementation
> }
> FIXED
> public void setContent(Object object, String mimeType) throws MessagingException {
> m_content = object; // trivial implementation
> addHeader(RFC2822Headers.CONTENT_TYPE, mimeType);
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
[jira] Assigned: (JAMES-863) MockMimeMessage bugs
Posted by "Stefano Bagnara (JIRA)" <se...@james.apache.org>.
[ https://issues.apache.org/jira/browse/JAMES-863?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stefano Bagnara reassigned JAMES-863:
-------------------------------------
Assignee: Stefano Bagnara
> MockMimeMessage bugs
> --------------------
>
> Key: JAMES-863
> URL: https://issues.apache.org/jira/browse/JAMES-863
> Project: JAMES Server
> Issue Type: Bug
> Components: Matchers/Mailets (bundled)
> Affects Versions: 2.3.1
> Reporter: Rafael Munoz
> Assignee: Stefano Bagnara
> Priority: Minor
>
> I have found a pair of bugs on the MockMimeMessage implementation when using it for my own tests. There very easy to fix and I'm including my proposal code for review.
> - MockMimeMessage has a wrong cast on the getFrom method
> ORIGINAL
> public Address[] getFrom() throws MessagingException {
> return (Address[])m_fromAddresses.toArray();
> }
> FIXED
> public Address[] getFrom() throws MessagingException {
> return (Address[])m_fromAddresses.toArray(new Address[m_fromAddresses.size()]);
> }
> - MockMimeMessage doesn't set the mimetype on the setContent method
> ORIGINAL
> public void setContent(Object object, String mimeType) throws MessagingException {
> m_content = object; // trivial implementation
> }
> FIXED
> public void setContent(Object object, String mimeType) throws MessagingException {
> m_content = object; // trivial implementation
> addHeader(RFC2822Headers.CONTENT_TYPE, mimeType);
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org