diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/at/gv/egiz/pdfas/utils/OgnlUtil.java | 5 |
1 files changed, 3 insertions, 2 deletions
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);
}
|