From d0d278c9c033bfef4491e4a05738f32c305581d8 Mon Sep 17 00:00:00 2001 From: ferbas Date: Thu, 19 Nov 2009 14:13:06 +0000 Subject: 1.4 compatibility git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@438 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c --- src/main/java/at/gv/egiz/pdfas/utils/OgnlUtil.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/main/java/at') diff --git a/src/main/java/at/gv/egiz/pdfas/utils/OgnlUtil.java b/src/main/java/at/gv/egiz/pdfas/utils/OgnlUtil.java index 32c9e0d..f9d8300 100644 --- a/src/main/java/at/gv/egiz/pdfas/utils/OgnlUtil.java +++ b/src/main/java/at/gv/egiz/pdfas/utils/OgnlUtil.java @@ -10,6 +10,7 @@ import java.util.Map.Entry; import ognl.Ognl; import ognl.OgnlException; +import org.apache.commons.lang.StringUtils; import org.apache.log4j.Logger; /** @@ -86,7 +87,7 @@ public class OgnlUtil { } public boolean containsExpression(String template) { - return template != null && template.contains("${") && template.contains("}"); + return template != null && StringUtils.contains(template,"${") && StringUtils.contains(template, "}"); } /** @@ -118,7 +119,7 @@ public class OgnlUtil { log.debug("Set value for expression to: empty string"); } - compiledMsg = compiledMsg.replace(EXP_START + expr + EXP_END, value); + compiledMsg = StringUtils.replace(compiledMsg, EXP_START + expr + EXP_END, value); } catch (OgnlException e) { log.error(e.getMessage(), e); } -- cgit v1.2.3