[ 
https://issues.apache.org/jira/browse/MIME4J-262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16021131#comment-16021131
 ] 

Luc DUZAN commented on MIME4J-262:
----------------------------------

Because I do not want to break old code that wasn't prepare to handle a null 
result from a getDate of a message created by message builder.
I will deprecate all the current way to construct a builder (static method and 
constructor) and provide other static method that will make the builder correct 
(not replace a null date by "new Date()").

> Message built by MessageBuilder do not respect getDate() contract
> -----------------------------------------------------------------
>
>                 Key: MIME4J-262
>                 URL: https://issues.apache.org/jira/browse/MIME4J-262
>             Project: James Mime4j
>          Issue Type: Bug
>            Reporter: Luc DUZAN
>
> Here is the getDate() documentation:
> {quote}
>     /**
>      * Returns the value of the <i>Date</i> header field of this message as
>      * <code>Date</code> object or <code>null</code> if it is not present.
>      *
>      * @return the date of this message.
>      */
>     Date getDate();
> {quote}
> Here is the builder code:
> {quote}
>     /**
>      * Returns the value of the <i>Date</i> header field of this message as
>      * <code>Date</code> object or <code>null</code> if it is not present.
>      *
>      * @return the date of this message.
>      */
>     Date getDate();
> {quote}
> We can see that MessageBuilder will make getDate() return a date and no null 
> even if the message has no `Date` header



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to