Skip to content

Commit

Permalink
cleanup and checkstyle
Browse files Browse the repository at this point in the history
  • Loading branch information
ununhexium committed Jun 17, 2024
1 parent 73f1455 commit d1b034d
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -55,7 +54,7 @@ public class SovityMessenger {
* @throws SovityMessengerException If a problem related to the message processing happened.
*/
public <T extends SovityMessage, R extends SovityMessage>
CompletableFuture<StatusResult<R>> send(Class<R> resultType, String counterPartyAddress, T payload) {
CompletableFuture<StatusResult<R>> send(Class<R> resultType, String counterPartyAddress, T payload) {
try {
val message = buildMessage(counterPartyAddress, payload);
val future = registry.dispatch(SovityMessageRequest.class, message);
Expand All @@ -81,7 +80,7 @@ public <T extends SovityMessage> void send(String counterPartyAddress, T payload

@NotNull
private <R extends SovityMessage>
Function<StatusResult<SovityMessageRequest>, StatusResult<R>> processResponse(Class<R> resultType) {
Function<StatusResult<SovityMessageRequest>, StatusResult<R>> processResponse(Class<R> resultType) {
return statusResult -> statusResult.map(content -> {
try {
val headerStr = content.header();
Expand All @@ -100,7 +99,7 @@ Function<StatusResult<SovityMessageRequest>, StatusResult<R>> processResponse(Cl

@NotNull
private <T extends SovityMessage>
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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@

class SovityMessengerRegistryImplTest {

// TODO: how test can build a mesasge without default constructor
@AllArgsConstructor
@NoArgsConstructor
@Getter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit d1b034d

Please sign in to comment.