IDEMPIERE-2303 NPE on MailText.parse

This commit is contained in:
Nicolas Micoud 2014-11-05 08:49:05 -05:00
parent 6ad4577e1d
commit 5bbeae195b
1 changed files with 2 additions and 2 deletions

View File

@ -157,7 +157,7 @@ public class MMailText extends X_R_MailText
*/
private String parse (String text)
{
if (text.indexOf('@') == -1)
if (Util.isEmpty(text) || text.indexOf('@') == -1)
return text;
// Parse User
text = parse (text, m_user);
@ -177,7 +177,7 @@ public class MMailText extends X_R_MailText
*/
private String parse (String text, PO po)
{
if (po == null || text.indexOf('@') == -1)
if (po == null || Util.isEmpty(text) || text.indexOf('@') == -1)
return text;
String inStr = text;