incubator-jspwiki-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dave Wolf (JIRA)" <j...@apache.org>
Subject [jira] Commented: (JSPWIKI-166) NullPointerException when mail.from property is omitted/commented out
Date Sun, 27 Jan 2008 22:33:34 GMT

    [ https://issues.apache.org/jira/browse/JSPWIKI-166?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12563029#action_12563029
] 

Dave Wolf commented on JSPWIKI-166:
-----------------------------------

>From MailUtil:
302        if (c_useJndi)
303        {
304            // Try getting the Session from the JNDI factory first
305            try
306            {
307                session = getJNDIMailSession(jndiName);
308                c_useJndi = false;
309            }
310            catch (NamingException e)
311            {
312                // Oops! JNDI factory must not be set up
313            }
314        }

Shouldn't line 308 be moved inside the catch?

> NullPointerException when mail.from property is omitted/commented out
> ---------------------------------------------------------------------
>
>                 Key: JSPWIKI-166
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-166
>             Project: JSPWiki
>          Issue Type: Bug
>          Components: Core & storage
>    Affects Versions: 2.6.1
>            Reporter: Florian Holeczek
>            Priority: Minor
>             Fix For: 2.6.1
>
>
> In line 266 of MailUtil.java:
> {code}String from = engine.getWikiProperties().getProperty( PROP_MAIL_SENDER ).trim();{code}
> If this property isn't defined, getProperty returns null.
> Apart from fixing this, it would be fine to redesign the comments in jspwiki.properties
and let the admin know that mail.from must be defined in each case, whether jndi mail or custom
mail is defined.
> Hint to a more general approach:
> I've seen that Properties can have a set of default properties. Doesn't JSPWiki use this
feature?

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