Skip to content

Commit

Permalink
Resolve feedback for locale string
Browse files Browse the repository at this point in the history
Signed-off-by: Junqiu Lei <[email protected]>
  • Loading branch information
junqiu-lei committed Jan 3, 2024
1 parent e91389b commit 95e522d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
package org.opensearch.knn.plugin.script;

import java.io.IOException;
import java.util.Locale;
import java.util.Map;

import org.apache.lucene.index.LeafReaderContext;
Expand Down Expand Up @@ -45,7 +46,7 @@ private Object getValue(Map<String, Object> params, String fieldName) {
if (value != null) return value;

KNNCounter.SCRIPT_QUERY_ERRORS.increment();
throw new IllegalArgumentException("Missing parameter [" + fieldName + "]");
throw new IllegalArgumentException(String.format(Locale.ROOT, "Missing parameter [%s]", fieldName));
}

@Override
Expand Down

0 comments on commit 95e522d

Please sign in to comment.