comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/datacage/templating/FunctionResolver.java @ 5629:ce982943ab46

Datacage: dc:contains() is now able to process strings
author Sascha L. Teichmann <teichmann@intevation.de>
date Wed, 10 Apr 2013 14:46:09 +0200
parents 62513c9183ba
children 619da3fa7a8b
comparison
equal deleted inserted replaced
5628:142ed3c62765 5629:ce982943ab46
154 return Boolean.TRUE; 154 return Boolean.TRUE;
155 } 155 }
156 } 156 }
157 } 157 }
158 158
159 if (haystack instanceof String && needle instanceof String) {
160 String h = (String)haystack;
161 String n = (String)needle;
162 return h.contains(n);
163 }
164
159 return Boolean.FALSE; 165 return Boolean.FALSE;
160 } 166 }
161 catch (Exception e) { 167 catch (Exception e) {
162 log.error(e); 168 log.error(e);
163 throw new XPathFunctionException(e); 169 throw new XPathFunctionException(e);

http://dive4elements.wald.intevation.org