Skip to content

Commit

Permalink
spotless check clean up
Browse files Browse the repository at this point in the history
Signed-off-by: Jackie Han <[email protected]>
  • Loading branch information
jackiehanyang committed Dec 22, 2023
1 parent 48466e8 commit a34dcd3
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -404,9 +404,9 @@ public static WorkflowState parse(XContentParser parser) throws IOException {
*/
public static WorkflowState parse(String json) throws IOException {
XContentParser parser = JsonXContent.jsonXContent.createParser(
NamedXContentRegistry.EMPTY,
LoggingDeprecationHandler.INSTANCE,
json
NamedXContentRegistry.EMPTY,
LoggingDeprecationHandler.INSTANCE,
json
);
ensureExpectedToken(XContentParser.Token.START_OBJECT, parser.nextToken(), parser);
return parse(parser);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -376,12 +376,12 @@ protected Response provisionWorkflow(String workflowId) throws Exception {
*/
protected Response deprovisionWorkflow(String workflowId) throws Exception {
return TestHelpers.makeRequest(
client(),
"POST",
String.format(Locale.ROOT, "%s/%s/%s", WORKFLOW_URI, workflowId, "_deprovision"),
ImmutableMap.of(),
"",
null
client(),
"POST",
String.format(Locale.ROOT, "%s/%s/%s", WORKFLOW_URI, workflowId, "_deprovision"),
ImmutableMap.of(),
"",
null
);
}

Expand All @@ -393,12 +393,12 @@ protected Response deprovisionWorkflow(String workflowId) throws Exception {
*/
protected Response deleteWorkflow(String workflowId) throws Exception {
return TestHelpers.makeRequest(
client(),
"POST",
String.format(Locale.ROOT, "%s/%s", WORKFLOW_URI, workflowId),
ImmutableMap.of(),
"",
null
client(),
"POST",
String.format(Locale.ROOT, "%s/%s", WORKFLOW_URI, workflowId),
ImmutableMap.of(),
"",
null
);
}

Expand Down Expand Up @@ -456,24 +456,24 @@ protected SearchResponse searchWorkflows(String query) throws Exception {

protected SearchResponse searchWorkflowState(String query) throws Exception {
Response restSearchResponse = TestHelpers.makeRequest(
client(),
"GET",
String.format(Locale.ROOT, "%s/state/_search", WORKFLOW_URI),
ImmutableMap.of(),
query,
null
client(),
"GET",
String.format(Locale.ROOT, "%s/state/_search", WORKFLOW_URI),
ImmutableMap.of(),
query,
null
);
assertEquals(RestStatus.OK, TestHelpers.restStatus(restSearchResponse));

// Parse entity content into SearchResponse
MediaType mediaType = MediaType.fromMediaType(restSearchResponse.getEntity().getContentType());
try (
XContentParser parser = mediaType.xContent()
.createParser(
NamedXContentRegistry.EMPTY,
DeprecationHandler.THROW_UNSUPPORTED_OPERATION,
restSearchResponse.getEntity().getContent()
)
XContentParser parser = mediaType.xContent()
.createParser(
NamedXContentRegistry.EMPTY,
DeprecationHandler.THROW_UNSUPPORTED_OPERATION,
restSearchResponse.getEntity().getContent()
)
) {
return SearchResponse.fromXContent(parser);
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/template/agent-framework.json
Original file line number Diff line number Diff line change
Expand Up @@ -198,4 +198,4 @@
]
}
}
}
}

0 comments on commit a34dcd3

Please sign in to comment.