Commits

Anonymous committed 7f6b0c2

XW-687 prevent VlidatorSUpport from translating null messages (causes a NPE)

git-svn-id: http://svn.opensymphony.com/svn/xwork/trunk@1957e221344d-f017-0410-9bd5-d282ab1896d7

Comments (0)

Files changed (1)

src/java/com/opensymphony/xwork2/validator/validators/ValidatorSupport.java

 import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.commons.lang.StringUtils;
+
 
 /**
  * Abstract implementation of the Validator interface suitable for subclassing.
             message = defaultMessage;
         }
 
-        message = TextParseUtil.translateVariables(message, stack);
+        if (StringUtils.isNotBlank(message))
+            message = TextParseUtil.translateVariables(message, stack);
 
         stack.pop();