Specification.where(null)
works just fine.
It is annotated with @Nullable
and the implementation handles null
values as it should.
The problem is that you are using the and
method as if it would modify the Specification
, but it creates a new one. So you should use
spec = spec.and( ... );