You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Siegfried Goeschl (JIRA)" <ji...@apache.org> on 2009/02/24 23:24:01 UTC

[jira] Resolved: (EMAIL-71) Email.getHostName() throws NullPointerException

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

Siegfried Goeschl resolved EMAIL-71.
------------------------------------

    Resolution: Fixed

Reviews and applied the patch - thanks to Corey Scott again ...

> Email.getHostName() throws NullPointerException
> -----------------------------------------------
>
>                 Key: EMAIL-71
>                 URL: https://issues.apache.org/jira/browse/EMAIL-71
>             Project: Commons Email
>          Issue Type: Bug
>    Affects Versions: 1.1
>            Reporter: Teemu Lång
>            Assignee: Siegfried Goeschl
>            Priority: Minor
>             Fix For: 1.2
>
>         Attachments: EMAIL-71-patch.txt
>
>
> If setHostName() has not been called, getHostName() tries to return this.session.getProperty(MAIL_HOST). If mail session has not been created yet, this will throw a NullPointerException. getHostName() should check that this.session is not null before trying to access it.
> The same applies to getSmtpPort() and getSslSmtpPort().

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.