From 5bbeae195b860702f807e3e9ab020e728731e8bb Mon Sep 17 00:00:00 2001 From: Nicolas Micoud Date: Wed, 5 Nov 2014 08:49:05 -0500 Subject: [PATCH] IDEMPIERE-2303 NPE on MailText.parse --- org.adempiere.base/src/org/compiere/model/MMailText.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/org.adempiere.base/src/org/compiere/model/MMailText.java b/org.adempiere.base/src/org/compiere/model/MMailText.java index 39fe1ea796..ada28c96c6 100644 --- a/org.adempiere.base/src/org/compiere/model/MMailText.java +++ b/org.adempiere.base/src/org/compiere/model/MMailText.java @@ -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;