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

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

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

ASF GitHub Bot logged work on EMAIL-184:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 27/Jul/19 13:50
            Start Date: 27/Jul/19 13:50
    Worklog Time Spent: 10m 
      Work Description: saksham93 commented on pull request #8: EMAIL-184: Should throw EmailException if email provided is null
URL: https://github.com/apache/commons-email/pull/8
 
 
   Should throw EmailException if email provided is null. Right now NPE is being encountered.
   
   (https://issues.apache.org/jira/projects/EMAIL/issues/EMAIL-184)
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

            Worklog Id:     (was: 283785)
            Time Spent: 10m
    Remaining Estimate: 0h

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