From 58914a332b4eea735db3f29520d810f55701493b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 20 Apr 2023 18:17:11 +0000 Subject: [PATCH 1/2] fix(deps): update spring boot to v3.0.6 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5127966350..9c48fe845c 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ 8.2.0 - 3.0.5 + 3.0.6 4.1.4 1.12.452 From 8d50755a97f5485a37b756db02e6f31fb40e6a89 Mon Sep 17 00:00:00 2001 From: Igor Petrov Date: Fri, 21 Apr 2023 11:18:26 +0300 Subject: [PATCH 2/2] fix(formatting): resolves correct formatting --- .../common/services/HTTPProxyService.java | 2 -- .../common/services/HTTPService.java | 2 -- .../graphql/GraphQLFunctionTest.java | 31 ++++++++++--------- 3 files changed, 17 insertions(+), 18 deletions(-) diff --git a/connectors/connectors-common-library/src/main/java/io/camunda/connector/common/services/HTTPProxyService.java b/connectors/connectors-common-library/src/main/java/io/camunda/connector/common/services/HTTPProxyService.java index e6b0e22b5e..f794b15310 100644 --- a/connectors/connectors-common-library/src/main/java/io/camunda/connector/common/services/HTTPProxyService.java +++ b/connectors/connectors-common-library/src/main/java/io/camunda/connector/common/services/HTTPProxyService.java @@ -25,8 +25,6 @@ import io.camunda.connector.common.constants.Constants; import io.camunda.connector.common.model.CommonRequest; import io.camunda.connector.common.model.HttpRequestBuilder; -import org.apache.http.protocol.HttpService; - import java.io.IOException; import java.io.OutputStream; import java.nio.charset.StandardCharsets; diff --git a/connectors/connectors-common-library/src/main/java/io/camunda/connector/common/services/HTTPService.java b/connectors/connectors-common-library/src/main/java/io/camunda/connector/common/services/HTTPService.java index 49737ae913..77012102f8 100644 --- a/connectors/connectors-common-library/src/main/java/io/camunda/connector/common/services/HTTPService.java +++ b/connectors/connectors-common-library/src/main/java/io/camunda/connector/common/services/HTTPService.java @@ -22,7 +22,6 @@ import com.google.api.client.http.HttpRequest; import com.google.api.client.http.HttpResponse; import com.google.api.client.http.HttpResponseException; -import com.google.common.collect.Collections2; import com.google.gson.Gson; import com.google.gson.JsonElement; import com.google.gson.JsonParseException; @@ -37,7 +36,6 @@ import java.io.InputStream; import java.io.StringReader; import java.nio.charset.StandardCharsets; -import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; diff --git a/connectors/graphql/src/test/java/io/camunda/connector/graphql/GraphQLFunctionTest.java b/connectors/graphql/src/test/java/io/camunda/connector/graphql/GraphQLFunctionTest.java index 88b29b2da0..3cee801198 100644 --- a/connectors/graphql/src/test/java/io/camunda/connector/graphql/GraphQLFunctionTest.java +++ b/connectors/graphql/src/test/java/io/camunda/connector/graphql/GraphQLFunctionTest.java @@ -203,31 +203,34 @@ void execute_shouldNotUseErrorDataOnHttpError() throws IOException { @ParameterizedTest(name = "Executing test case: {0}") @MethodSource("successCases") void execute_shouldContainCustomHeaders(final String input) - throws IOException, InstantiationException, IllegalAccessException { + throws IOException, InstantiationException, IllegalAccessException { // given - minimal required entity final var context = - OutboundConnectorContextBuilder.create().variables(input).secrets(name -> "foo").build(); - HttpHeaders headers = HTTPService.extractRequestHeaders( + OutboundConnectorContextBuilder.create().variables(input).secrets(name -> "foo").build(); + HttpHeaders headers = + HTTPService.extractRequestHeaders( gson.fromJson( - gson.fromJson(input, JsonObject.class).get("graphql").toString(), - GraphQLRequest.class)); + gson.fromJson(input, JsonObject.class).get("graphql").toString(), + GraphQLRequest.class)); when(requestFactory.buildRequest( anyString(), any(GenericUrl.class), nullable(HttpContent.class))) - .thenReturn(httpRequest); + .thenReturn(httpRequest); when(httpResponse.getHeaders()) - .thenReturn(new HttpHeaders().setContentType(APPLICATION_JSON.getMimeType())); + .thenReturn(new HttpHeaders().setContentType(APPLICATION_JSON.getMimeType())); when(httpRequest.execute()).thenReturn(httpResponse); // when functionUnderTest.execute(context); // then - verify(httpRequest).setHeaders( - argThat(httpHeaders -> - headers.entrySet() - .stream() - .allMatch( - entry -> httpHeaders.containsKey(entry.getKey()) && - httpHeaders.containsValue(entry.getValue())))); + verify(httpRequest) + .setHeaders( + argThat( + httpHeaders -> + headers.entrySet().stream() + .allMatch( + entry -> + httpHeaders.containsKey(entry.getKey()) + && httpHeaders.containsValue(entry.getValue())))); } private static Stream successCases() throws IOException {