From ab50b3bff4d93808f2eed50dbfb3551557559e16 Mon Sep 17 00:00:00 2001 From: dyma solovei Date: Fri, 27 Mar 2026 16:24:52 +0100 Subject: [PATCH] fix(config): initialize Stopwords with empty additions/removals lists --- .../weaviate/client6/v1/api/collections/InvertedIndex.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/io/weaviate/client6/v1/api/collections/InvertedIndex.java b/src/main/java/io/weaviate/client6/v1/api/collections/InvertedIndex.java index a350f3de0..ff49621c5 100644 --- a/src/main/java/io/weaviate/client6/v1/api/collections/InvertedIndex.java +++ b/src/main/java/io/weaviate/client6/v1/api/collections/InvertedIndex.java @@ -1,5 +1,6 @@ package io.weaviate.client6.v1.api.collections; +import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.function.Function; @@ -92,8 +93,8 @@ public Stopwords(Builder builder) { public static class Builder implements ObjectBuilder { private String preset; - private List additions; - private List removals; + private final List additions = new ArrayList<>(); + private final List removals = new ArrayList<>(); /** Select a preset to use for a particular language. */ public Builder preset(String preset) {