Skip to content

Commit c768ad4

Browse files
committed
chore: guard against null operators
Possible if someone does Where.not(null)
1 parent 6afe650 commit c768ad4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • src/main/java/io/weaviate/client6/v1/api/collections/query

src/main/java/io/weaviate/client6/v1/api/collections/query/Where.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ private Where(Operator operator, List<WhereOperand> operands) {
6666
public boolean isEmpty() {
6767
// Guard against Where.and(Where.or(), Where.and(), Where.not()) situation.
6868
return operands.isEmpty()
69-
|| operands.stream().allMatch(operator -> operator.isEmpty());
69+
|| operands.stream().allMatch(operator -> operator == null | operator.isEmpty());
7070
}
7171

7272
@Override

0 commit comments

Comments
 (0)