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

Luc DUZAN updated MIME4J-262:
-----------------------------
    Description: 
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

  was:
Here is the getDate() documentation:

```
    /**
     * 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();
```

Here is the builder code:
```
    /**
     * 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();
```

We can see that MessageBuilder will make getDate() return a date and no null 
even if the message has no `Date` header


> 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