Skip to content

Commit 59cc274

Browse files
author
elasticsearchmachine
committed
[CI] Auto commit changes from spotless
1 parent cfa398a commit 59cc274

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/inference/action/InferenceAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ public ActionRequestValidationException validate() {
274274
}
275275

276276
if (taskType.equals(TaskType.TEXT_EMBEDDING) || taskType.equals(TaskType.SPARSE_EMBEDDING)) {
277-
if(query != null) {
277+
if (query != null) {
278278
var e = new ActionRequestValidationException();
279279
e.addValidationError(format("Field [query] cannot be specified for task type [%s]", taskType));
280280
return e;

x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/inference/action/InferenceActionRequestTests.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,10 @@ public void testValidation_SparseEmbedding_WithQuery() {
342342
);
343343
ActionRequestValidationException queryError = queryRequest.validate();
344344
assertNotNull(queryError);
345-
assertThat(queryError.getMessage(), is("Validation Failed: 1: Field [query] cannot be specified for task type [sparse_embedding];"));
345+
assertThat(
346+
queryError.getMessage(),
347+
is("Validation Failed: 1: Field [query] cannot be specified for task type [sparse_embedding];")
348+
);
346349
}
347350

348351
public void testValidation_Completion_WithInputType() {

0 commit comments

Comments
 (0)