commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Teemu Lång (JIRA) <j...@apache.org>
Subject [jira] Updated: (EMAIL-71) Email.getHostName() throws NullPointerException
Date Sun, 16 Dec 2007 00:17:43 GMT

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

Teemu Lång updated EMAIL-71:
----------------------------

    Description: 
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().

  was:
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 for getSmtpPort() and getSslSmtpPort().


> 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
>            Priority: Minor
>
> 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.


Mime
View raw message