You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Saksham Gupta (JIRA)" <ji...@apache.org> on 2019/07/27 13:56:00 UTC

[jira] [Commented] (EMAIL-184) Undescribed NullPointerException in Email.setFrom method

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

Saksham Gupta commented on EMAIL-184:
-------------------------------------

Pull request has been raised for this.

> Undescribed NullPointerException in Email.setFrom method
> --------------------------------------------------------
>
>                 Key: EMAIL-184
>                 URL: https://issues.apache.org/jira/browse/EMAIL-184
>             Project: Commons Email
>          Issue Type: Bug
>    Affects Versions: 1.5
>            Reporter: John Smith
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> The method setFrom(String email, String name) of Email throws a NullPointerException if null is passed for email. Could you please either fix the Nullpointer or update the JavaDoc. 
>   
>  JavaDoc of Email.setFrom(String, String):
> Email org.apache.commons.mail.Email.setFrom(String email, String name) throws EmailException
> Set the FROM field of the email to use the specified address and the specified personal name. 
> The name will be encoded by the charset of setCharset(). If it is not set, it will be encoded 
> using the Java platform's default charset (UTF-16) if it contains non-ASCII characters; otherwise, 
> it is used as is.
> Parameters:email A String.name A String.
> Returns:An Email.
> Throws:EmailException - Indicates an invalid email address.
> Since:1.0
>  



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)