From d1b034dc21224b13a47ca9e40db549e7f18e2d55 Mon Sep 17 00:00:00 2001 From: Christophe Loiseau Date: Mon, 17 Jun 2024 14:03:50 +0200 Subject: [PATCH] cleanup and checkstyle --- .../sovitymessenger/demo/SovityMessengerDemo.java | 2 +- .../de/sovity/edc/extension/messenger/SovityMessenger.java | 7 +++---- .../messenger/controller/SovityMessageController.java | 2 +- .../messenger/impl/SovityMessengerRegistryImplTest.java | 1 - .../e2e/connector/config/ConnectorConfigFactory.java | 4 +++- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/demo/sovity-messenger-demo/src/main/java/de/sovity/edc/extension/sovitymessenger/demo/SovityMessengerDemo.java b/demo/sovity-messenger-demo/src/main/java/de/sovity/edc/extension/sovitymessenger/demo/SovityMessengerDemo.java index 6dee1b3a6..723163499 100644 --- a/demo/sovity-messenger-demo/src/main/java/de/sovity/edc/extension/sovitymessenger/demo/SovityMessengerDemo.java +++ b/demo/sovity-messenger-demo/src/main/java/de/sovity/edc/extension/sovitymessenger/demo/SovityMessengerDemo.java @@ -13,8 +13,8 @@ package de.sovity.edc.extension.sovitymessenger.demo; -import de.sovity.edc.extension.messenger.SovityMessengerRegistry; import de.sovity.edc.extension.messenger.SovityMessenger; +import de.sovity.edc.extension.messenger.SovityMessengerRegistry; import de.sovity.edc.extension.sovitymessenger.demo.message.Addition; import de.sovity.edc.extension.sovitymessenger.demo.message.Answer; import de.sovity.edc.extension.sovitymessenger.demo.message.Signal; diff --git a/extensions/sovity-messenger/src/main/java/de/sovity/edc/extension/messenger/SovityMessenger.java b/extensions/sovity-messenger/src/main/java/de/sovity/edc/extension/messenger/SovityMessenger.java index 5da2cceec..1d995511c 100644 --- a/extensions/sovity-messenger/src/main/java/de/sovity/edc/extension/messenger/SovityMessenger.java +++ b/extensions/sovity-messenger/src/main/java/de/sovity/edc/extension/messenger/SovityMessenger.java @@ -19,7 +19,6 @@ import de.sovity.edc.extension.messenger.impl.SovityMessengerStatus; import de.sovity.edc.utils.JsonUtils; import jakarta.json.Json; -import lombok.AllArgsConstructor; import lombok.RequiredArgsConstructor; import lombok.val; import org.eclipse.edc.spi.EdcException; @@ -55,7 +54,7 @@ public class SovityMessenger { * @throws SovityMessengerException If a problem related to the message processing happened. */ public - CompletableFuture> send(Class resultType, String counterPartyAddress, T payload) { + CompletableFuture> send(Class resultType, String counterPartyAddress, T payload) { try { val message = buildMessage(counterPartyAddress, payload); val future = registry.dispatch(SovityMessageRequest.class, message); @@ -81,7 +80,7 @@ public void send(String counterPartyAddress, T payload @NotNull private - Function, StatusResult> processResponse(Class resultType) { + Function, StatusResult> processResponse(Class resultType) { return statusResult -> statusResult.map(content -> { try { val headerStr = content.header(); @@ -100,7 +99,7 @@ Function, StatusResult> processResponse(Cl @NotNull private - SovityMessageRequest buildMessage(String counterPartyAddress, T payload) + SovityMessageRequest buildMessage(String counterPartyAddress, T payload) throws MalformedURLException, URISyntaxException, JsonProcessingException { val url = new URI(counterPartyAddress).toURL(); val header1 = Json.createObjectBuilder() diff --git a/extensions/sovity-messenger/src/main/java/de/sovity/edc/extension/messenger/controller/SovityMessageController.java b/extensions/sovity-messenger/src/main/java/de/sovity/edc/extension/messenger/controller/SovityMessageController.java index 0d0755052..f7aabfb15 100644 --- a/extensions/sovity-messenger/src/main/java/de/sovity/edc/extension/messenger/controller/SovityMessageController.java +++ b/extensions/sovity-messenger/src/main/java/de/sovity/edc/extension/messenger/controller/SovityMessageController.java @@ -15,8 +15,8 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; -import de.sovity.edc.extension.messenger.SovityMessengerRegistry; import de.sovity.edc.extension.messenger.SovityMessage; +import de.sovity.edc.extension.messenger.SovityMessengerRegistry; import de.sovity.edc.extension.messenger.impl.Handler; import de.sovity.edc.extension.messenger.impl.SovityMessageRequest; import de.sovity.edc.extension.messenger.impl.SovityMessageResponse; diff --git a/extensions/sovity-messenger/src/test/java/de/sovity/edc/extension/messenger/impl/SovityMessengerRegistryImplTest.java b/extensions/sovity-messenger/src/test/java/de/sovity/edc/extension/messenger/impl/SovityMessengerRegistryImplTest.java index bd35d7915..b2c44cd72 100644 --- a/extensions/sovity-messenger/src/test/java/de/sovity/edc/extension/messenger/impl/SovityMessengerRegistryImplTest.java +++ b/extensions/sovity-messenger/src/test/java/de/sovity/edc/extension/messenger/impl/SovityMessengerRegistryImplTest.java @@ -29,7 +29,6 @@ class SovityMessengerRegistryImplTest { - // TODO: how test can build a mesasge without default constructor @AllArgsConstructor @NoArgsConstructor @Getter diff --git a/utils/test-connector-remote/src/main/java/de/sovity/edc/extension/e2e/connector/config/ConnectorConfigFactory.java b/utils/test-connector-remote/src/main/java/de/sovity/edc/extension/e2e/connector/config/ConnectorConfigFactory.java index e533649dd..6c7a046f8 100644 --- a/utils/test-connector-remote/src/main/java/de/sovity/edc/extension/e2e/connector/config/ConnectorConfigFactory.java +++ b/utils/test-connector-remote/src/main/java/de/sovity/edc/extension/e2e/connector/config/ConnectorConfigFactory.java @@ -35,8 +35,10 @@ public class ConnectorConfigFactory { private static final Random RANDOM = new Random(); /** + * Creates the default configuration to start an EDC with the given test database. + * * @deprecated Use {@link ConnectorConfigFactory#forTestDatabase(String, TestDatabase)} - * with automatic ports allocation to prevent port allocation conflicts. + * with automatic ports allocation to prevent port allocation conflicts. */ @Deprecated public static ConnectorConfig forTestDatabase(String participantId, int firstPort, TestDatabase testDatabase) {