Skip to content

Commit 5b8c573

Browse files
author
elasticsearchmachine
committed
[CI] Auto commit changes from spotless
1 parent 53af9be commit 5b8c573

File tree

3 files changed

+4
-10
lines changed

3 files changed

+4
-10
lines changed

x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/services/custom/response/NoopResponseParser.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@ public NoopResponseParser(StreamInput in) {
3232
this();
3333
}
3434

35-
public void writeTo(StreamOutput out) throws IOException {
36-
}
37-
35+
public void writeTo(StreamOutput out) throws IOException {}
3836

3937
public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
4038
return builder;

x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/services/custom/response/BaseCustomResponseParserTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public void testValidateAndCastList_ThrowsException() {
6868
}
6969

7070
public void testValidateMap() {
71-
assertThat(validateMap(Map.of("abc", 123)), is(Map.of("abc", 123)));
71+
assertThat(validateMap(Map.of("abc", 123)), is(Map.of("abc", 123)));
7272
}
7373

7474
public void testValidateMap_ThrowsException_WhenObjectIsNotAMap() {

x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/services/custom/response/ErrorResponseParserTests.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,7 @@ public void testFromMap_ThrowsException_WhenRequiredFieldIsNotPresent() {
4747
() -> ErrorResponseParser.fromMap(new HashMap<>(Map.of("some_field", "$.error.message")), validation)
4848
);
4949

50-
assertThat(
51-
exception.getMessage(),
52-
is("Validation Failed: 1: [error_parser] does not contain the required setting [path];")
53-
);
50+
assertThat(exception.getMessage(), is("Validation Failed: 1: [error_parser] does not contain the required setting [path];"));
5451
}
5552

5653
public void testToXContent() throws IOException {
@@ -124,8 +121,7 @@ public void testFromResponse_noMessage() throws IOException {
124121
}
125122

126123
public void testErrorResponse_ReturnsUndefinedObjectIfNoError() throws IOException {
127-
var mockResult
128-
= getMockResult("""
124+
var mockResult = getMockResult("""
129125
{"noerror":true}""");
130126

131127
var parser = new ErrorResponseParser("$.error.message");

0 commit comments

Comments
 (0)