summaryrefslogtreecommitdiffstats
path: root/server/src
diff options
context:
space:
mode:
authorPatrik Lindström <patrik@vaadin.com>2013-06-28 14:56:21 +0300
committerVaadin Code Review <review@vaadin.com>2013-06-28 13:50:24 +0000
commit4583d07cd7094e2b987df6350b4b19eb4c01c210 (patch)
tree6c0cb714fb2618b6b3d48ff8066e0c1cdb09df4c /server/src
parent414e3bf1c93f7e80b94ec2f0355e03c27412730a (diff)
downloadvaadin-framework-4583d07cd7094e2b987df6350b4b19eb4c01c210.tar.gz
vaadin-framework-4583d07cd7094e2b987df6350b4b19eb4c01c210.zip
Fix NPE in Like.java (#10167)
Change-Id: I041fbc5c3cda08d3cf3453cefc5f044c63dbe9bb
Diffstat (limited to 'server/src')
-rw-r--r--server/src/com/vaadin/data/util/filter/Like.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/server/src/com/vaadin/data/util/filter/Like.java b/server/src/com/vaadin/data/util/filter/Like.java
index 91230bb1f1..4c15564105 100644
--- a/server/src/com/vaadin/data/util/filter/Like.java
+++ b/server/src/com/vaadin/data/util/filter/Like.java
@@ -60,6 +60,11 @@ public class Like implements Filter {
String colValue = (String) item.getItemProperty(getPropertyId())
.getValue();
+ // Fix issue #10167 - avoid NPE and drop null property values
+ if (colValue == null) {
+ return false;
+ }
+
String pattern = getValue().replace("%", ".*");
if (isCaseSensitive()) {
return colValue.matches(pattern);