Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Bug in com.vaadin.data.util.filter.Like.passesFilter(Like.java:64)
Hi.
I have a table with 2 columns (Name, Profession) and it has 10 rows.
In one of this rows the column Name is null.
So, i tried to use the Like class for a filter by Name then i got this error:
Caused by: java.lang.NullPointerException
at com.vaadin.data.util.filter.Like.passesFilter(Like.java:64)
at com.vaadin.data.util.AbstractInMemoryContainer.passesFilters(AbstractInMemoryContainer.java:394)
at com.vaadin.data.util.AbstractInMemoryContainer.doFilterContainer(AbstractInMemoryContainer.java:365)
at com.vaadin.data.util.AbstractInMemoryContainer.filterAll(AbstractInMemoryContainer.java:326)
at com.vaadin.data.util.AbstractInMemoryContainer.addFilter(AbstractInMemoryContainer.java:422)
at com.vaadin.data.util.AbstractBeanContainer.addContainerFilter(AbstractBeanContainer.java:369)
If i put a value or just empty at the null column name, and try to filter again the error does not occur.
Tanks.
Edi Ortega: I have a table with 2 columns (Name, Profession) and it has 10 rows.
In one of this rows the column Name is null.
The Like filter does not support null values.
If you want to use it and have nulls in your data, use something like And(Not(IsNull), Like) or Or(IsNull, Like), depending on which matches your desired behavior.