Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/datacage/templating/FunctionResolver.java @ 5630:619da3fa7a8b
Datacage: fix dc:contains() Do not uppercase needle if its not a container search.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Wed, 10 Apr 2013 14:51:57 +0200 |
parents | ce982943ab46 |
children | efbbfe32e9fe |
comparison
equal
deleted
inserted
replaced
5629:ce982943ab46 | 5630:619da3fa7a8b |
---|---|
131 /** Implementation of case-ignoring dc:contains. */ | 131 /** Implementation of case-ignoring dc:contains. */ |
132 public Object contains(List args) throws XPathFunctionException { | 132 public Object contains(List args) throws XPathFunctionException { |
133 Object haystack = args.get(0); | 133 Object haystack = args.get(0); |
134 Object needle = args.get(1); | 134 Object needle = args.get(1); |
135 | 135 |
136 if (needle instanceof String) { | 136 if (needle instanceof String && !(haystack instanceof String)) { |
137 needle = ((String)needle).toUpperCase(); | 137 needle = ((String)needle).toUpperCase(); |
138 } | 138 } |
139 | 139 |
140 try { | 140 try { |
141 if (haystack instanceof Collection) { | 141 if (haystack instanceof Collection) { |