diff options
Diffstat (limited to 'client/src/main')
-rw-r--r-- | client/src/main/java/ai/vespa/client/dsl/Text.java | 6 | ||||
-rw-r--r-- | client/src/main/java/ai/vespa/client/dsl/WeakAnd.java | 8 |
2 files changed, 8 insertions, 6 deletions
diff --git a/client/src/main/java/ai/vespa/client/dsl/Text.java b/client/src/main/java/ai/vespa/client/dsl/Text.java index aca43d40b6a..34931b78d2f 100644 --- a/client/src/main/java/ai/vespa/client/dsl/Text.java +++ b/client/src/main/java/ai/vespa/client/dsl/Text.java @@ -1,15 +1,17 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. - package ai.vespa.client.dsl; import java.util.Locale; /** * Text utility functions. + * * @author arnej - **/ + */ final class Text { + public static String format(String format, Object... args) { return String.format(Locale.US, format, args); } + } diff --git a/client/src/main/java/ai/vespa/client/dsl/WeakAnd.java b/client/src/main/java/ai/vespa/client/dsl/WeakAnd.java index 3059e4adea1..04e1abc9f49 100644 --- a/client/src/main/java/ai/vespa/client/dsl/WeakAnd.java +++ b/client/src/main/java/ai/vespa/client/dsl/WeakAnd.java @@ -5,9 +5,9 @@ import java.util.stream.Collectors; public class WeakAnd extends QueryChain { - private String fieldName; + private final String fieldName; private Annotation annotation; - private Query value; + private final Query value; WeakAnd(String fieldName, Query value) { @@ -55,8 +55,8 @@ public class WeakAnd extends QueryChain { boolean hasAnnotation = A.hasAnnotation(annotation); String s = - Text.format("weakAnd(%s, %s)", fieldName, - value.queries.stream().map(Object::toString).collect(Collectors.joining(", "))); + Text.format("weakAnd(%s)", + value.queries.stream().map(Object::toString).collect(Collectors.joining(", "))); return hasAnnotation ? Text.format("([%s]%s)", annotation, s) : s; } } |