diff --git a/data-protocols/dsp/dsp-catalog/dsp-catalog-http-dispatcher/src/main/java/org/eclipse/edc/protocol/dsp/catalog/dispatcher/delegate/CatalogRequestHttpRawDelegate.java b/data-protocols/dsp/dsp-catalog/dsp-catalog-http-dispatcher/src/main/java/org/eclipse/edc/protocol/dsp/catalog/dispatcher/delegate/CatalogRequestHttpRawDelegate.java index ab216918957..3931365485b 100644 --- a/data-protocols/dsp/dsp-catalog/dsp-catalog-http-dispatcher/src/main/java/org/eclipse/edc/protocol/dsp/catalog/dispatcher/delegate/CatalogRequestHttpRawDelegate.java +++ b/data-protocols/dsp/dsp-catalog/dsp-catalog-http-dispatcher/src/main/java/org/eclipse/edc/protocol/dsp/catalog/dispatcher/delegate/CatalogRequestHttpRawDelegate.java @@ -16,7 +16,6 @@ import jakarta.json.JsonObject; import okhttp3.Response; -import org.eclipse.edc.catalog.spi.CatalogRequestMessage; import org.eclipse.edc.protocol.dsp.spi.dispatcher.DspHttpDispatcherDelegate; import org.eclipse.edc.spi.EdcException; @@ -27,7 +26,7 @@ * Delegate for dispatching catalog requests as defined in the * dataspace protocol specification */ -public class CatalogRequestHttpRawDelegate extends DspHttpDispatcherDelegate { +public class CatalogRequestHttpRawDelegate extends DspHttpDispatcherDelegate { public CatalogRequestHttpRawDelegate() { super(); @@ -43,8 +42,8 @@ public CatalogRequestHttpRawDelegate() { public Function parseResponse() { return response -> { try { + //noinspection DataFlowIssue return response.body().bytes(); - } catch (NullPointerException e) { throw new EdcException("Failed to read response body, as body was null.", e); } catch (IOException e) { diff --git a/data-protocols/dsp/dsp-catalog/dsp-catalog-http-dispatcher/src/main/java/org/eclipse/edc/protocol/dsp/catalog/dispatcher/delegate/DatasetRequestHttpRawDelegate.java b/data-protocols/dsp/dsp-catalog/dsp-catalog-http-dispatcher/src/main/java/org/eclipse/edc/protocol/dsp/catalog/dispatcher/delegate/DatasetRequestHttpRawDelegate.java index 4da7c169964..15854e611ea 100644 --- a/data-protocols/dsp/dsp-catalog/dsp-catalog-http-dispatcher/src/main/java/org/eclipse/edc/protocol/dsp/catalog/dispatcher/delegate/DatasetRequestHttpRawDelegate.java +++ b/data-protocols/dsp/dsp-catalog/dsp-catalog-http-dispatcher/src/main/java/org/eclipse/edc/protocol/dsp/catalog/dispatcher/delegate/DatasetRequestHttpRawDelegate.java @@ -16,7 +16,6 @@ import jakarta.json.JsonObject; import okhttp3.Response; -import org.eclipse.edc.catalog.spi.DatasetRequestMessage; import org.eclipse.edc.protocol.dsp.spi.dispatcher.DspHttpDispatcherDelegate; import org.eclipse.edc.spi.EdcException; @@ -27,7 +26,7 @@ * Delegate for dispatching catalog requests as defined in the * dataspace protocol specification */ -public class DatasetRequestHttpRawDelegate extends DspHttpDispatcherDelegate { +public class DatasetRequestHttpRawDelegate extends DspHttpDispatcherDelegate { public DatasetRequestHttpRawDelegate() { super(); @@ -43,6 +42,7 @@ public DatasetRequestHttpRawDelegate() { public Function parseResponse() { return response -> { try { + //noinspection DataFlowIssue return response.body().bytes(); } catch (NullPointerException e) { diff --git a/data-protocols/dsp/dsp-catalog/dsp-catalog-http-dispatcher/src/test/java/org/eclipse/edc/protocol/dsp/catalog/dispatcher/delegate/CatalogRequestHttpRawDelegateTest.java b/data-protocols/dsp/dsp-catalog/dsp-catalog-http-dispatcher/src/test/java/org/eclipse/edc/protocol/dsp/catalog/dispatcher/delegate/CatalogRequestHttpRawDelegateTest.java index f3fdfdf3522..afbd5d30539 100644 --- a/data-protocols/dsp/dsp-catalog/dsp-catalog-http-dispatcher/src/test/java/org/eclipse/edc/protocol/dsp/catalog/dispatcher/delegate/CatalogRequestHttpRawDelegateTest.java +++ b/data-protocols/dsp/dsp-catalog/dsp-catalog-http-dispatcher/src/test/java/org/eclipse/edc/protocol/dsp/catalog/dispatcher/delegate/CatalogRequestHttpRawDelegateTest.java @@ -57,7 +57,7 @@ void parseResponse_responseBodyNull_throwException() { } @Override - protected DspHttpDispatcherDelegate delegate() { + protected DspHttpDispatcherDelegate delegate() { return delegate; } diff --git a/data-protocols/dsp/dsp-catalog/dsp-catalog-http-dispatcher/src/test/java/org/eclipse/edc/protocol/dsp/catalog/dispatcher/delegate/DatasetRequestHttpRawDelegateTest.java b/data-protocols/dsp/dsp-catalog/dsp-catalog-http-dispatcher/src/test/java/org/eclipse/edc/protocol/dsp/catalog/dispatcher/delegate/DatasetRequestHttpRawDelegateTest.java index dee5da6bff4..169dcac818d 100644 --- a/data-protocols/dsp/dsp-catalog/dsp-catalog-http-dispatcher/src/test/java/org/eclipse/edc/protocol/dsp/catalog/dispatcher/delegate/DatasetRequestHttpRawDelegateTest.java +++ b/data-protocols/dsp/dsp-catalog/dsp-catalog-http-dispatcher/src/test/java/org/eclipse/edc/protocol/dsp/catalog/dispatcher/delegate/DatasetRequestHttpRawDelegateTest.java @@ -57,15 +57,8 @@ void parseResponse_responseBodyNull_throwException() { } @Override - protected DspHttpDispatcherDelegate delegate() { + protected DspHttpDispatcherDelegate delegate() { return delegate; } - private DatasetRequestMessage message() { - return DatasetRequestMessage.Builder.newInstance() - .datasetId("dataset-id") - .counterPartyAddress("http://connector") - .protocol("protocol") - .build(); - } } diff --git a/data-protocols/dsp/dsp-http-core/src/main/java/org/eclipse/edc/protocol/dsp/dispatcher/DspHttpRemoteMessageDispatcherImpl.java b/data-protocols/dsp/dsp-http-core/src/main/java/org/eclipse/edc/protocol/dsp/dispatcher/DspHttpRemoteMessageDispatcherImpl.java index 8308d1c6273..4e732d88969 100644 --- a/data-protocols/dsp/dsp-http-core/src/main/java/org/eclipse/edc/protocol/dsp/dispatcher/DspHttpRemoteMessageDispatcherImpl.java +++ b/data-protocols/dsp/dsp-http-core/src/main/java/org/eclipse/edc/protocol/dsp/dispatcher/DspHttpRemoteMessageDispatcherImpl.java @@ -108,11 +108,11 @@ public void registerPolicyScope(Class messageClass, } @Override - public void registerMessage(Class clazz, DspHttpRequestFactory requestFactory, DspHttpDispatcherDelegate delegate) { + public void registerMessage(Class clazz, DspHttpRequestFactory requestFactory, DspHttpDispatcherDelegate delegate) { handlers.put(clazz, new Handlers<>(requestFactory, delegate)); } - private record Handlers(DspHttpRequestFactory requestFactory, DspHttpDispatcherDelegate delegate) { } + private record Handlers(DspHttpRequestFactory requestFactory, DspHttpDispatcherDelegate delegate) { } private record PolicyScope(Class messageClass, String scope, Function policyProvider) {} diff --git a/data-protocols/dsp/dsp-http-core/src/test/java/org/eclipse/edc/protocol/dsp/dispatcher/DspHttpRemoteMessageDispatcherImplTest.java b/data-protocols/dsp/dsp-http-core/src/test/java/org/eclipse/edc/protocol/dsp/dispatcher/DspHttpRemoteMessageDispatcherImplTest.java index 0873b7e025e..eac73a9c152 100644 --- a/data-protocols/dsp/dsp-http-core/src/test/java/org/eclipse/edc/protocol/dsp/dispatcher/DspHttpRemoteMessageDispatcherImplTest.java +++ b/data-protocols/dsp/dsp-http-core/src/test/java/org/eclipse/edc/protocol/dsp/dispatcher/DspHttpRemoteMessageDispatcherImplTest.java @@ -60,7 +60,7 @@ class DspHttpRemoteMessageDispatcherImplTest { private final PolicyEngine policyEngine = mock(); private final TokenDecorator tokenDecorator = mock(); private final DspHttpRequestFactory requestFactory = mock(); - private final DspHttpDispatcherDelegate delegate = mock(); + private final DspHttpDispatcherDelegate delegate = mock(); private final Duration timeout = Duration.of(5, SECONDS); private DspHttpRemoteMessageDispatcher dispatcher; diff --git a/data-protocols/dsp/dsp-http-spi/src/main/java/org/eclipse/edc/protocol/dsp/spi/dispatcher/DspHttpDispatcherDelegate.java b/data-protocols/dsp/dsp-http-spi/src/main/java/org/eclipse/edc/protocol/dsp/spi/dispatcher/DspHttpDispatcherDelegate.java index 6f64c407ba0..4309efcd980 100644 --- a/data-protocols/dsp/dsp-http-spi/src/main/java/org/eclipse/edc/protocol/dsp/spi/dispatcher/DspHttpDispatcherDelegate.java +++ b/data-protocols/dsp/dsp-http-spi/src/main/java/org/eclipse/edc/protocol/dsp/spi/dispatcher/DspHttpDispatcherDelegate.java @@ -29,10 +29,9 @@ /** * Delegate for sending a specific type of {@link RemoteMessage} using the dataspace protocol. * - * @param the type of message * @param the response type */ -public abstract class DspHttpDispatcherDelegate { +public abstract class DspHttpDispatcherDelegate { protected DspHttpDispatcherDelegate() { } diff --git a/data-protocols/dsp/dsp-http-spi/src/main/java/org/eclipse/edc/protocol/dsp/spi/dispatcher/DspHttpRemoteMessageDispatcher.java b/data-protocols/dsp/dsp-http-spi/src/main/java/org/eclipse/edc/protocol/dsp/spi/dispatcher/DspHttpRemoteMessageDispatcher.java index 3f6e97040c8..ce2f1f5aa25 100644 --- a/data-protocols/dsp/dsp-http-spi/src/main/java/org/eclipse/edc/protocol/dsp/spi/dispatcher/DspHttpRemoteMessageDispatcher.java +++ b/data-protocols/dsp/dsp-http-spi/src/main/java/org/eclipse/edc/protocol/dsp/spi/dispatcher/DspHttpRemoteMessageDispatcher.java @@ -34,7 +34,7 @@ public interface DspHttpRemoteMessageDispatcher extends RemoteMessageDispatcher * @param the type of message * @param the response type */ - void registerMessage(Class clazz, DspHttpRequestFactory requestFactory, DspHttpDispatcherDelegate delegate); + void registerMessage(Class clazz, DspHttpRequestFactory requestFactory, DspHttpDispatcherDelegate delegate); /** * Registers a {@link Policy} scope to be evaluated for certain types of messages diff --git a/data-protocols/dsp/dsp-http-spi/src/main/java/org/eclipse/edc/protocol/dsp/spi/error/DspErrorResponse.java b/data-protocols/dsp/dsp-http-spi/src/main/java/org/eclipse/edc/protocol/dsp/spi/error/DspErrorResponse.java index 461d86d6267..c47fcbd7004 100644 --- a/data-protocols/dsp/dsp-http-spi/src/main/java/org/eclipse/edc/protocol/dsp/spi/error/DspErrorResponse.java +++ b/data-protocols/dsp/dsp-http-spi/src/main/java/org/eclipse/edc/protocol/dsp/spi/error/DspErrorResponse.java @@ -47,10 +47,6 @@ public Response from(ServiceFailure failure) { return internalBuild(code, failure.getMessages()); } - public Response unauthorized() { - return internalBuild(Response.Status.UNAUTHORIZED, List.of("Token validation failed.")); - } - public Response badRequest() { return internalBuild(Response.Status.BAD_REQUEST, List.of("Bad request.")); } diff --git a/data-protocols/dsp/dsp-http-spi/src/test/java/org/eclipse/edc/protocol/dsp/spi/dispatcher/DspHttpDispatcherDelegateTest.java b/data-protocols/dsp/dsp-http-spi/src/test/java/org/eclipse/edc/protocol/dsp/spi/dispatcher/DspHttpDispatcherDelegateTest.java index 48d9847596d..63f7378a674 100644 --- a/data-protocols/dsp/dsp-http-spi/src/test/java/org/eclipse/edc/protocol/dsp/spi/dispatcher/DspHttpDispatcherDelegateTest.java +++ b/data-protocols/dsp/dsp-http-spi/src/test/java/org/eclipse/edc/protocol/dsp/spi/dispatcher/DspHttpDispatcherDelegateTest.java @@ -21,7 +21,6 @@ import okhttp3.ResponseBody; import org.eclipse.edc.protocol.dsp.spi.serialization.JsonLdRemoteMessageSerializer; import org.eclipse.edc.spi.response.ResponseFailure; -import org.eclipse.edc.spi.types.domain.message.RemoteMessage; import org.jetbrains.annotations.NotNull; import org.junit.jupiter.api.Test; @@ -88,7 +87,7 @@ void handleResponse_shouldReturnRetryError_whenResponseIsServerError() { verifyNoInteractions(parser); } - private class TestDspHttpDispatcherDelegate extends DspHttpDispatcherDelegate { + private class TestDspHttpDispatcherDelegate extends DspHttpDispatcherDelegate { TestDspHttpDispatcherDelegate() { super(); diff --git a/data-protocols/dsp/dsp-http-spi/src/testFixtures/java/org/eclipse/edc/protocol/dsp/spi/testfixtures/dispatcher/DspHttpDispatcherDelegateTestBase.java b/data-protocols/dsp/dsp-http-spi/src/testFixtures/java/org/eclipse/edc/protocol/dsp/spi/testfixtures/dispatcher/DspHttpDispatcherDelegateTestBase.java index d5bfc6b9113..ddd4123cb2e 100644 --- a/data-protocols/dsp/dsp-http-spi/src/testFixtures/java/org/eclipse/edc/protocol/dsp/spi/testfixtures/dispatcher/DspHttpDispatcherDelegateTestBase.java +++ b/data-protocols/dsp/dsp-http-spi/src/testFixtures/java/org/eclipse/edc/protocol/dsp/spi/testfixtures/dispatcher/DspHttpDispatcherDelegateTestBase.java @@ -55,7 +55,7 @@ public abstract class DspHttpDispatcherDelegateTestBase * * @return the delegate */ - protected abstract DspHttpDispatcherDelegate delegate(); + protected abstract DspHttpDispatcherDelegate delegate(); /** * Checks that a delegate throws an exception when the response body is missing. Only relevant diff --git a/data-protocols/dsp/dsp-negotiation/dsp-negotiation-http-dispatcher/src/main/java/org/eclipse/edc/protocol/dsp/negotiation/dispatcher/DspNegotiationHttpDispatcherExtension.java b/data-protocols/dsp/dsp-negotiation/dsp-negotiation-http-dispatcher/src/main/java/org/eclipse/edc/protocol/dsp/negotiation/dispatcher/DspNegotiationHttpDispatcherExtension.java index 938ee3ce220..2f008c52da3 100644 --- a/data-protocols/dsp/dsp-negotiation/dsp-negotiation-http-dispatcher/src/main/java/org/eclipse/edc/protocol/dsp/negotiation/dispatcher/DspNegotiationHttpDispatcherExtension.java +++ b/data-protocols/dsp/dsp-negotiation/dsp-negotiation-http-dispatcher/src/main/java/org/eclipse/edc/protocol/dsp/negotiation/dispatcher/DspNegotiationHttpDispatcherExtension.java @@ -70,22 +70,22 @@ public void initialize(ServiceExtensionContext context) { messageDispatcher.registerMessage( ContractAgreementMessage.class, new PostDspHttpRequestFactory<>(remoteMessageSerializer, m -> BASE_PATH + m.getProcessId() + AGREEMENT), - new ContractAgreementMessageHttpDelegate(remoteMessageSerializer) + new ContractAgreementMessageHttpDelegate() ); messageDispatcher.registerMessage( ContractAgreementVerificationMessage.class, new PostDspHttpRequestFactory<>(remoteMessageSerializer, m -> BASE_PATH + m.getProcessId() + AGREEMENT + VERIFICATION), - new ContractAgreementVerificationMessageHttpDelegate(remoteMessageSerializer) + new ContractAgreementVerificationMessageHttpDelegate() ); messageDispatcher.registerMessage( ContractNegotiationEventMessage.class, new PostDspHttpRequestFactory<>(remoteMessageSerializer, m -> BASE_PATH + m.getProcessId() + EVENT), - new ContractNegotiationEventMessageHttpDelegate(remoteMessageSerializer) + new ContractNegotiationEventMessageHttpDelegate() ); messageDispatcher.registerMessage( ContractNegotiationTerminationMessage.class, new PostDspHttpRequestFactory<>(remoteMessageSerializer, m -> BASE_PATH + m.getProcessId() + TERMINATION), - new ContractNegotiationTerminationMessageHttpDelegate(remoteMessageSerializer) + new ContractNegotiationTerminationMessageHttpDelegate() ); messageDispatcher.registerMessage( ContractRequestMessage.class, @@ -96,12 +96,12 @@ public void initialize(ServiceExtensionContext context) { return BASE_PATH + m.getProcessId() + CONTRACT_REQUEST; } }), - new ContractRequestMessageHttpDelegate(remoteMessageSerializer, typeManager.getMapper(JSON_LD), jsonLdService) + new ContractRequestMessageHttpDelegate(typeManager.getMapper(JSON_LD), jsonLdService) ); messageDispatcher.registerMessage( ContractOfferMessage.class, new PostDspHttpRequestFactory<>(remoteMessageSerializer, m -> BASE_PATH + m.getProcessId() + CONTRACT_OFFER), - new ContractOfferMessageHttpDelegate(remoteMessageSerializer) + new ContractOfferMessageHttpDelegate() ); } } diff --git a/data-protocols/dsp/dsp-negotiation/dsp-negotiation-http-dispatcher/src/main/java/org/eclipse/edc/protocol/dsp/negotiation/dispatcher/delegate/ContractAgreementMessageHttpDelegate.java b/data-protocols/dsp/dsp-negotiation/dsp-negotiation-http-dispatcher/src/main/java/org/eclipse/edc/protocol/dsp/negotiation/dispatcher/delegate/ContractAgreementMessageHttpDelegate.java index 32c9a8762d9..636005537d1 100644 --- a/data-protocols/dsp/dsp-negotiation/dsp-negotiation-http-dispatcher/src/main/java/org/eclipse/edc/protocol/dsp/negotiation/dispatcher/delegate/ContractAgreementMessageHttpDelegate.java +++ b/data-protocols/dsp/dsp-negotiation/dsp-negotiation-http-dispatcher/src/main/java/org/eclipse/edc/protocol/dsp/negotiation/dispatcher/delegate/ContractAgreementMessageHttpDelegate.java @@ -15,18 +15,16 @@ package org.eclipse.edc.protocol.dsp.negotiation.dispatcher.delegate; import okhttp3.Response; -import org.eclipse.edc.connector.contract.spi.types.agreement.ContractAgreementMessage; import org.eclipse.edc.protocol.dsp.spi.dispatcher.DspHttpDispatcherDelegate; -import org.eclipse.edc.protocol.dsp.spi.serialization.JsonLdRemoteMessageSerializer; import java.util.function.Function; /** * Delegate for dispatching contract agreement message as defined in the dataspace protocol specification. */ -public class ContractAgreementMessageHttpDelegate extends DspHttpDispatcherDelegate { +public class ContractAgreementMessageHttpDelegate extends DspHttpDispatcherDelegate { - public ContractAgreementMessageHttpDelegate(JsonLdRemoteMessageSerializer serializer) { + public ContractAgreementMessageHttpDelegate() { super(); } diff --git a/data-protocols/dsp/dsp-negotiation/dsp-negotiation-http-dispatcher/src/main/java/org/eclipse/edc/protocol/dsp/negotiation/dispatcher/delegate/ContractAgreementVerificationMessageHttpDelegate.java b/data-protocols/dsp/dsp-negotiation/dsp-negotiation-http-dispatcher/src/main/java/org/eclipse/edc/protocol/dsp/negotiation/dispatcher/delegate/ContractAgreementVerificationMessageHttpDelegate.java index c260b9a4f65..653823f4eee 100644 --- a/data-protocols/dsp/dsp-negotiation/dsp-negotiation-http-dispatcher/src/main/java/org/eclipse/edc/protocol/dsp/negotiation/dispatcher/delegate/ContractAgreementVerificationMessageHttpDelegate.java +++ b/data-protocols/dsp/dsp-negotiation/dsp-negotiation-http-dispatcher/src/main/java/org/eclipse/edc/protocol/dsp/negotiation/dispatcher/delegate/ContractAgreementVerificationMessageHttpDelegate.java @@ -15,18 +15,16 @@ package org.eclipse.edc.protocol.dsp.negotiation.dispatcher.delegate; import okhttp3.Response; -import org.eclipse.edc.connector.contract.spi.types.agreement.ContractAgreementVerificationMessage; import org.eclipse.edc.protocol.dsp.spi.dispatcher.DspHttpDispatcherDelegate; -import org.eclipse.edc.protocol.dsp.spi.serialization.JsonLdRemoteMessageSerializer; import java.util.function.Function; /** * Delegate for dispatching contract agreement verification message as defined in the dataspace protocol specification. */ -public class ContractAgreementVerificationMessageHttpDelegate extends DspHttpDispatcherDelegate { +public class ContractAgreementVerificationMessageHttpDelegate extends DspHttpDispatcherDelegate { - public ContractAgreementVerificationMessageHttpDelegate(JsonLdRemoteMessageSerializer serializer) { + public ContractAgreementVerificationMessageHttpDelegate() { super(); } diff --git a/data-protocols/dsp/dsp-negotiation/dsp-negotiation-http-dispatcher/src/main/java/org/eclipse/edc/protocol/dsp/negotiation/dispatcher/delegate/ContractNegotiationEventMessageHttpDelegate.java b/data-protocols/dsp/dsp-negotiation/dsp-negotiation-http-dispatcher/src/main/java/org/eclipse/edc/protocol/dsp/negotiation/dispatcher/delegate/ContractNegotiationEventMessageHttpDelegate.java index 87195908a12..21d50118648 100644 --- a/data-protocols/dsp/dsp-negotiation/dsp-negotiation-http-dispatcher/src/main/java/org/eclipse/edc/protocol/dsp/negotiation/dispatcher/delegate/ContractNegotiationEventMessageHttpDelegate.java +++ b/data-protocols/dsp/dsp-negotiation/dsp-negotiation-http-dispatcher/src/main/java/org/eclipse/edc/protocol/dsp/negotiation/dispatcher/delegate/ContractNegotiationEventMessageHttpDelegate.java @@ -15,18 +15,16 @@ package org.eclipse.edc.protocol.dsp.negotiation.dispatcher.delegate; import okhttp3.Response; -import org.eclipse.edc.connector.contract.spi.types.agreement.ContractNegotiationEventMessage; import org.eclipse.edc.protocol.dsp.spi.dispatcher.DspHttpDispatcherDelegate; -import org.eclipse.edc.protocol.dsp.spi.serialization.JsonLdRemoteMessageSerializer; import java.util.function.Function; /** * Delegate for dispatching contract negotiation event message as defined in the dataspace protocol specification. */ -public class ContractNegotiationEventMessageHttpDelegate extends DspHttpDispatcherDelegate { +public class ContractNegotiationEventMessageHttpDelegate extends DspHttpDispatcherDelegate { - public ContractNegotiationEventMessageHttpDelegate(JsonLdRemoteMessageSerializer serializer) { + public ContractNegotiationEventMessageHttpDelegate() { super(); } diff --git a/data-protocols/dsp/dsp-negotiation/dsp-negotiation-http-dispatcher/src/main/java/org/eclipse/edc/protocol/dsp/negotiation/dispatcher/delegate/ContractNegotiationTerminationMessageHttpDelegate.java b/data-protocols/dsp/dsp-negotiation/dsp-negotiation-http-dispatcher/src/main/java/org/eclipse/edc/protocol/dsp/negotiation/dispatcher/delegate/ContractNegotiationTerminationMessageHttpDelegate.java index c80f7c12d02..ffa0bf8e273 100644 --- a/data-protocols/dsp/dsp-negotiation/dsp-negotiation-http-dispatcher/src/main/java/org/eclipse/edc/protocol/dsp/negotiation/dispatcher/delegate/ContractNegotiationTerminationMessageHttpDelegate.java +++ b/data-protocols/dsp/dsp-negotiation/dsp-negotiation-http-dispatcher/src/main/java/org/eclipse/edc/protocol/dsp/negotiation/dispatcher/delegate/ContractNegotiationTerminationMessageHttpDelegate.java @@ -15,18 +15,16 @@ package org.eclipse.edc.protocol.dsp.negotiation.dispatcher.delegate; import okhttp3.Response; -import org.eclipse.edc.connector.contract.spi.types.negotiation.ContractNegotiationTerminationMessage; import org.eclipse.edc.protocol.dsp.spi.dispatcher.DspHttpDispatcherDelegate; -import org.eclipse.edc.protocol.dsp.spi.serialization.JsonLdRemoteMessageSerializer; import java.util.function.Function; /** * Delegate for dispatching contract negotiation termination message as defined in the dataspace protocol specification. */ -public class ContractNegotiationTerminationMessageHttpDelegate extends DspHttpDispatcherDelegate { +public class ContractNegotiationTerminationMessageHttpDelegate extends DspHttpDispatcherDelegate { - public ContractNegotiationTerminationMessageHttpDelegate(JsonLdRemoteMessageSerializer serializer) { + public ContractNegotiationTerminationMessageHttpDelegate() { super(); } diff --git a/data-protocols/dsp/dsp-negotiation/dsp-negotiation-http-dispatcher/src/main/java/org/eclipse/edc/protocol/dsp/negotiation/dispatcher/delegate/ContractOfferMessageHttpDelegate.java b/data-protocols/dsp/dsp-negotiation/dsp-negotiation-http-dispatcher/src/main/java/org/eclipse/edc/protocol/dsp/negotiation/dispatcher/delegate/ContractOfferMessageHttpDelegate.java index 3d66c8b9c88..0e54e3e2dca 100644 --- a/data-protocols/dsp/dsp-negotiation/dsp-negotiation-http-dispatcher/src/main/java/org/eclipse/edc/protocol/dsp/negotiation/dispatcher/delegate/ContractOfferMessageHttpDelegate.java +++ b/data-protocols/dsp/dsp-negotiation/dsp-negotiation-http-dispatcher/src/main/java/org/eclipse/edc/protocol/dsp/negotiation/dispatcher/delegate/ContractOfferMessageHttpDelegate.java @@ -15,18 +15,16 @@ package org.eclipse.edc.protocol.dsp.negotiation.dispatcher.delegate; import okhttp3.Response; -import org.eclipse.edc.connector.contract.spi.types.negotiation.ContractOfferMessage; import org.eclipse.edc.protocol.dsp.spi.dispatcher.DspHttpDispatcherDelegate; -import org.eclipse.edc.protocol.dsp.spi.serialization.JsonLdRemoteMessageSerializer; import java.util.function.Function; /** * Delegate for dispatching contract offer message as defined in the dataspace protocol specification. */ -public class ContractOfferMessageHttpDelegate extends DspHttpDispatcherDelegate { - - public ContractOfferMessageHttpDelegate(JsonLdRemoteMessageSerializer serializer) { +public class ContractOfferMessageHttpDelegate extends DspHttpDispatcherDelegate { + + public ContractOfferMessageHttpDelegate() { super(); } diff --git a/data-protocols/dsp/dsp-negotiation/dsp-negotiation-http-dispatcher/src/main/java/org/eclipse/edc/protocol/dsp/negotiation/dispatcher/delegate/ContractRequestMessageHttpDelegate.java b/data-protocols/dsp/dsp-negotiation/dsp-negotiation-http-dispatcher/src/main/java/org/eclipse/edc/protocol/dsp/negotiation/dispatcher/delegate/ContractRequestMessageHttpDelegate.java index dabbd8bac39..2ee012677df 100644 --- a/data-protocols/dsp/dsp-negotiation/dsp-negotiation-http-dispatcher/src/main/java/org/eclipse/edc/protocol/dsp/negotiation/dispatcher/delegate/ContractRequestMessageHttpDelegate.java +++ b/data-protocols/dsp/dsp-negotiation/dsp-negotiation-http-dispatcher/src/main/java/org/eclipse/edc/protocol/dsp/negotiation/dispatcher/delegate/ContractRequestMessageHttpDelegate.java @@ -17,10 +17,8 @@ import com.fasterxml.jackson.databind.ObjectMapper; import jakarta.json.JsonObject; import okhttp3.Response; -import org.eclipse.edc.connector.contract.spi.types.negotiation.ContractRequestMessage; import org.eclipse.edc.jsonld.spi.JsonLd; import org.eclipse.edc.protocol.dsp.spi.dispatcher.DspHttpDispatcherDelegate; -import org.eclipse.edc.protocol.dsp.spi.serialization.JsonLdRemoteMessageSerializer; import org.eclipse.edc.spi.EdcException; import java.io.IOException; @@ -29,13 +27,13 @@ /** * Delegate for dispatching contract request message as defined in the dataspace protocol specification. */ -public class ContractRequestMessageHttpDelegate extends DspHttpDispatcherDelegate { +public class ContractRequestMessageHttpDelegate extends DspHttpDispatcherDelegate { private final ObjectMapper mapper; private final JsonLd jsonLdService; - public ContractRequestMessageHttpDelegate(JsonLdRemoteMessageSerializer serializer, ObjectMapper mapper, JsonLd jsonLdService) { + public ContractRequestMessageHttpDelegate(ObjectMapper mapper, JsonLd jsonLdService) { super(); this.mapper = mapper; this.jsonLdService = jsonLdService; @@ -45,6 +43,7 @@ public ContractRequestMessageHttpDelegate(JsonLdRemoteMessageSerializer serializ public Function parseResponse() { return response -> { try { + //noinspection DataFlowIssue var jsonObject = mapper.readValue(response.body().bytes(), JsonObject.class); return jsonLdService.expand(jsonObject).map(jo -> jo).orElseThrow(failure -> new EdcException(failure.getFailureDetail())); } catch (NullPointerException e) { diff --git a/data-protocols/dsp/dsp-negotiation/dsp-negotiation-http-dispatcher/src/test/java/org/eclipse/edc/protocol/dsp/negotiation/dispatcher/delegate/ContractAgreementMessageHttpDelegateTest.java b/data-protocols/dsp/dsp-negotiation/dsp-negotiation-http-dispatcher/src/test/java/org/eclipse/edc/protocol/dsp/negotiation/dispatcher/delegate/ContractAgreementMessageHttpDelegateTest.java index e2631c31f63..f1c89153ab6 100644 --- a/data-protocols/dsp/dsp-negotiation/dsp-negotiation-http-dispatcher/src/test/java/org/eclipse/edc/protocol/dsp/negotiation/dispatcher/delegate/ContractAgreementMessageHttpDelegateTest.java +++ b/data-protocols/dsp/dsp-negotiation/dsp-negotiation-http-dispatcher/src/test/java/org/eclipse/edc/protocol/dsp/negotiation/dispatcher/delegate/ContractAgreementMessageHttpDelegateTest.java @@ -26,7 +26,7 @@ class ContractAgreementMessageHttpDelegateTest extends DspHttpDispatcherDelegate @BeforeEach void setUp() { - delegate = new ContractAgreementMessageHttpDelegate(serializer); + delegate = new ContractAgreementMessageHttpDelegate(); } @Test @@ -35,7 +35,7 @@ void parseResponse_returnNull() { } @Override - protected DspHttpDispatcherDelegate delegate() { + protected DspHttpDispatcherDelegate delegate() { return delegate; } } diff --git a/data-protocols/dsp/dsp-negotiation/dsp-negotiation-http-dispatcher/src/test/java/org/eclipse/edc/protocol/dsp/negotiation/dispatcher/delegate/ContractAgreementVerificationMessageHttpDelegateTest.java b/data-protocols/dsp/dsp-negotiation/dsp-negotiation-http-dispatcher/src/test/java/org/eclipse/edc/protocol/dsp/negotiation/dispatcher/delegate/ContractAgreementVerificationMessageHttpDelegateTest.java index 5d7084ea138..8541f035af9 100644 --- a/data-protocols/dsp/dsp-negotiation/dsp-negotiation-http-dispatcher/src/test/java/org/eclipse/edc/protocol/dsp/negotiation/dispatcher/delegate/ContractAgreementVerificationMessageHttpDelegateTest.java +++ b/data-protocols/dsp/dsp-negotiation/dsp-negotiation-http-dispatcher/src/test/java/org/eclipse/edc/protocol/dsp/negotiation/dispatcher/delegate/ContractAgreementVerificationMessageHttpDelegateTest.java @@ -21,12 +21,12 @@ import org.junit.jupiter.api.Test; class ContractAgreementVerificationMessageHttpDelegateTest extends DspHttpDispatcherDelegateTestBase { - + private ContractAgreementVerificationMessageHttpDelegate delegate; @BeforeEach void setUp() { - delegate = new ContractAgreementVerificationMessageHttpDelegate(serializer); + delegate = new ContractAgreementVerificationMessageHttpDelegate(); } @Test @@ -35,7 +35,7 @@ void parseResponse_returnNull() { } @Override - protected DspHttpDispatcherDelegate delegate() { + protected DspHttpDispatcherDelegate delegate() { return delegate; } } diff --git a/data-protocols/dsp/dsp-negotiation/dsp-negotiation-http-dispatcher/src/test/java/org/eclipse/edc/protocol/dsp/negotiation/dispatcher/delegate/ContractNegotiationEventMessageHttpDelegateTest.java b/data-protocols/dsp/dsp-negotiation/dsp-negotiation-http-dispatcher/src/test/java/org/eclipse/edc/protocol/dsp/negotiation/dispatcher/delegate/ContractNegotiationEventMessageHttpDelegateTest.java index 70d175b045a..214fbc0d2fc 100644 --- a/data-protocols/dsp/dsp-negotiation/dsp-negotiation-http-dispatcher/src/test/java/org/eclipse/edc/protocol/dsp/negotiation/dispatcher/delegate/ContractNegotiationEventMessageHttpDelegateTest.java +++ b/data-protocols/dsp/dsp-negotiation/dsp-negotiation-http-dispatcher/src/test/java/org/eclipse/edc/protocol/dsp/negotiation/dispatcher/delegate/ContractNegotiationEventMessageHttpDelegateTest.java @@ -21,12 +21,12 @@ import org.junit.jupiter.api.Test; class ContractNegotiationEventMessageHttpDelegateTest extends DspHttpDispatcherDelegateTestBase { - + private ContractNegotiationEventMessageHttpDelegate delegate; @BeforeEach void setUp() { - delegate = new ContractNegotiationEventMessageHttpDelegate(serializer); + delegate = new ContractNegotiationEventMessageHttpDelegate(); } @Test @@ -35,7 +35,7 @@ void parseResponse_returnNull() { } @Override - protected DspHttpDispatcherDelegate delegate() { + protected DspHttpDispatcherDelegate delegate() { return delegate; } } diff --git a/data-protocols/dsp/dsp-negotiation/dsp-negotiation-http-dispatcher/src/test/java/org/eclipse/edc/protocol/dsp/negotiation/dispatcher/delegate/ContractNegotiationTerminationMessageHttpDelegateTest.java b/data-protocols/dsp/dsp-negotiation/dsp-negotiation-http-dispatcher/src/test/java/org/eclipse/edc/protocol/dsp/negotiation/dispatcher/delegate/ContractNegotiationTerminationMessageHttpDelegateTest.java index 69e59dbb75d..8217d6ed87c 100644 --- a/data-protocols/dsp/dsp-negotiation/dsp-negotiation-http-dispatcher/src/test/java/org/eclipse/edc/protocol/dsp/negotiation/dispatcher/delegate/ContractNegotiationTerminationMessageHttpDelegateTest.java +++ b/data-protocols/dsp/dsp-negotiation/dsp-negotiation-http-dispatcher/src/test/java/org/eclipse/edc/protocol/dsp/negotiation/dispatcher/delegate/ContractNegotiationTerminationMessageHttpDelegateTest.java @@ -21,12 +21,12 @@ import org.junit.jupiter.api.Test; class ContractNegotiationTerminationMessageHttpDelegateTest extends DspHttpDispatcherDelegateTestBase { - + private ContractNegotiationTerminationMessageHttpDelegate delegate; @BeforeEach void setUp() { - delegate = new ContractNegotiationTerminationMessageHttpDelegate(serializer); + delegate = new ContractNegotiationTerminationMessageHttpDelegate(); } @Test @@ -35,7 +35,7 @@ void parseResponse_returnNull() { } @Override - protected DspHttpDispatcherDelegate delegate() { + protected DspHttpDispatcherDelegate delegate() { return delegate; } } diff --git a/data-protocols/dsp/dsp-negotiation/dsp-negotiation-http-dispatcher/src/test/java/org/eclipse/edc/protocol/dsp/negotiation/dispatcher/delegate/ContractOfferMessageHttpDelegateTest.java b/data-protocols/dsp/dsp-negotiation/dsp-negotiation-http-dispatcher/src/test/java/org/eclipse/edc/protocol/dsp/negotiation/dispatcher/delegate/ContractOfferMessageHttpDelegateTest.java index a516df535f9..a473982dc68 100644 --- a/data-protocols/dsp/dsp-negotiation/dsp-negotiation-http-dispatcher/src/test/java/org/eclipse/edc/protocol/dsp/negotiation/dispatcher/delegate/ContractOfferMessageHttpDelegateTest.java +++ b/data-protocols/dsp/dsp-negotiation/dsp-negotiation-http-dispatcher/src/test/java/org/eclipse/edc/protocol/dsp/negotiation/dispatcher/delegate/ContractOfferMessageHttpDelegateTest.java @@ -21,21 +21,21 @@ import org.junit.jupiter.api.Test; class ContractOfferMessageHttpDelegateTest extends DspHttpDispatcherDelegateTestBase { - + private ContractOfferMessageHttpDelegate delegate; - + @BeforeEach void setUp() { - delegate = new ContractOfferMessageHttpDelegate(serializer); + delegate = new ContractOfferMessageHttpDelegate(); } @Test void parseResponse_shouldReturnNullFunction() { testParseResponse_shouldReturnNullFunction_whenResponseBodyNotProcessed(); } - + @Override - protected DspHttpDispatcherDelegate delegate() { + protected DspHttpDispatcherDelegate delegate() { return delegate; } diff --git a/data-protocols/dsp/dsp-negotiation/dsp-negotiation-http-dispatcher/src/test/java/org/eclipse/edc/protocol/dsp/negotiation/dispatcher/delegate/ContractRequestMessageHttpDelegateTest.java b/data-protocols/dsp/dsp-negotiation/dsp-negotiation-http-dispatcher/src/test/java/org/eclipse/edc/protocol/dsp/negotiation/dispatcher/delegate/ContractRequestMessageHttpDelegateTest.java index e71ba606864..03dbcb99e3f 100644 --- a/data-protocols/dsp/dsp-negotiation/dsp-negotiation-http-dispatcher/src/test/java/org/eclipse/edc/protocol/dsp/negotiation/dispatcher/delegate/ContractRequestMessageHttpDelegateTest.java +++ b/data-protocols/dsp/dsp-negotiation/dsp-negotiation-http-dispatcher/src/test/java/org/eclipse/edc/protocol/dsp/negotiation/dispatcher/delegate/ContractRequestMessageHttpDelegateTest.java @@ -48,7 +48,7 @@ class ContractRequestMessageHttpDelegateTest extends DspHttpDispatcherDelegateTe @BeforeEach void setUp() { jsonLdService = new TitaniumJsonLd(mock(Monitor.class)); - delegate = new ContractRequestMessageHttpDelegate(serializer, mapper, jsonLdService); + delegate = new ContractRequestMessageHttpDelegate(mapper, jsonLdService); } @Test @@ -80,7 +80,7 @@ void parseResponse_readingResponseBodyFails_throwException() throws IOException } @Override - protected DspHttpDispatcherDelegate delegate() { + protected DspHttpDispatcherDelegate delegate() { return delegate; } diff --git a/data-protocols/dsp/dsp-transfer-process/dsp-transfer-process-http-dispatcher/src/main/java/org/eclipse/edc/protocol/dsp/transferprocess/dispatcher/DspTransferProcessDispatcherExtension.java b/data-protocols/dsp/dsp-transfer-process/dsp-transfer-process-http-dispatcher/src/main/java/org/eclipse/edc/protocol/dsp/transferprocess/dispatcher/DspTransferProcessDispatcherExtension.java index 2008ba70b8e..88e7f74f9d3 100644 --- a/data-protocols/dsp/dsp-transfer-process/dsp-transfer-process-http-dispatcher/src/main/java/org/eclipse/edc/protocol/dsp/transferprocess/dispatcher/DspTransferProcessDispatcherExtension.java +++ b/data-protocols/dsp/dsp-transfer-process/dsp-transfer-process-http-dispatcher/src/main/java/org/eclipse/edc/protocol/dsp/transferprocess/dispatcher/DspTransferProcessDispatcherExtension.java @@ -61,7 +61,7 @@ public void initialize(ServiceExtensionContext context) { messageDispatcher.registerMessage( TransferRequestMessage.class, new PostDspHttpRequestFactory<>(remoteMessageSerializer, m -> BASE_PATH + TRANSFER_INITIAL_REQUEST), - new TransferRequestDelegate(remoteMessageSerializer) + new TransferRequestDelegate() ); messageDispatcher.registerMessage( TransferCompletionMessage.class, @@ -71,12 +71,12 @@ public void initialize(ServiceExtensionContext context) { messageDispatcher.registerMessage( TransferStartMessage.class, new PostDspHttpRequestFactory<>(remoteMessageSerializer, m -> BASE_PATH + m.getProcessId() + TRANSFER_START), - new TransferStartDelegate(remoteMessageSerializer) + new TransferStartDelegate() ); messageDispatcher.registerMessage( TransferTerminationMessage.class, new PostDspHttpRequestFactory<>(remoteMessageSerializer, m -> BASE_PATH + m.getProcessId() + TRANSFER_TERMINATION), - new TransferTerminationDelegate(remoteMessageSerializer) + new TransferTerminationDelegate() ); } } diff --git a/data-protocols/dsp/dsp-transfer-process/dsp-transfer-process-http-dispatcher/src/main/java/org/eclipse/edc/protocol/dsp/transferprocess/dispatcher/delegate/TransferCompletionDelegate.java b/data-protocols/dsp/dsp-transfer-process/dsp-transfer-process-http-dispatcher/src/main/java/org/eclipse/edc/protocol/dsp/transferprocess/dispatcher/delegate/TransferCompletionDelegate.java index 49fbfa6ff6d..95fa9e479a6 100644 --- a/data-protocols/dsp/dsp-transfer-process/dsp-transfer-process-http-dispatcher/src/main/java/org/eclipse/edc/protocol/dsp/transferprocess/dispatcher/delegate/TransferCompletionDelegate.java +++ b/data-protocols/dsp/dsp-transfer-process/dsp-transfer-process-http-dispatcher/src/main/java/org/eclipse/edc/protocol/dsp/transferprocess/dispatcher/delegate/TransferCompletionDelegate.java @@ -16,13 +16,12 @@ import jakarta.json.JsonObject; import okhttp3.Response; -import org.eclipse.edc.connector.transfer.spi.types.protocol.TransferCompletionMessage; import org.eclipse.edc.protocol.dsp.spi.dispatcher.DspHttpDispatcherDelegate; import org.eclipse.edc.protocol.dsp.spi.serialization.JsonLdRemoteMessageSerializer; import java.util.function.Function; -public class TransferCompletionDelegate extends DspHttpDispatcherDelegate { +public class TransferCompletionDelegate extends DspHttpDispatcherDelegate { public TransferCompletionDelegate(JsonLdRemoteMessageSerializer serializer) { super(); diff --git a/data-protocols/dsp/dsp-transfer-process/dsp-transfer-process-http-dispatcher/src/main/java/org/eclipse/edc/protocol/dsp/transferprocess/dispatcher/delegate/TransferRequestDelegate.java b/data-protocols/dsp/dsp-transfer-process/dsp-transfer-process-http-dispatcher/src/main/java/org/eclipse/edc/protocol/dsp/transferprocess/dispatcher/delegate/TransferRequestDelegate.java index 486b3fe1d14..8fd6df7e23a 100644 --- a/data-protocols/dsp/dsp-transfer-process/dsp-transfer-process-http-dispatcher/src/main/java/org/eclipse/edc/protocol/dsp/transferprocess/dispatcher/delegate/TransferRequestDelegate.java +++ b/data-protocols/dsp/dsp-transfer-process/dsp-transfer-process-http-dispatcher/src/main/java/org/eclipse/edc/protocol/dsp/transferprocess/dispatcher/delegate/TransferRequestDelegate.java @@ -16,15 +16,13 @@ import jakarta.json.JsonObject; import okhttp3.Response; -import org.eclipse.edc.connector.transfer.spi.types.protocol.TransferRequestMessage; import org.eclipse.edc.protocol.dsp.spi.dispatcher.DspHttpDispatcherDelegate; -import org.eclipse.edc.protocol.dsp.spi.serialization.JsonLdRemoteMessageSerializer; import java.util.function.Function; -public class TransferRequestDelegate extends DspHttpDispatcherDelegate { +public class TransferRequestDelegate extends DspHttpDispatcherDelegate { - public TransferRequestDelegate(JsonLdRemoteMessageSerializer serializer) { + public TransferRequestDelegate() { super(); } diff --git a/data-protocols/dsp/dsp-transfer-process/dsp-transfer-process-http-dispatcher/src/main/java/org/eclipse/edc/protocol/dsp/transferprocess/dispatcher/delegate/TransferStartDelegate.java b/data-protocols/dsp/dsp-transfer-process/dsp-transfer-process-http-dispatcher/src/main/java/org/eclipse/edc/protocol/dsp/transferprocess/dispatcher/delegate/TransferStartDelegate.java index e47b28e2f08..f03a2039a41 100644 --- a/data-protocols/dsp/dsp-transfer-process/dsp-transfer-process-http-dispatcher/src/main/java/org/eclipse/edc/protocol/dsp/transferprocess/dispatcher/delegate/TransferStartDelegate.java +++ b/data-protocols/dsp/dsp-transfer-process/dsp-transfer-process-http-dispatcher/src/main/java/org/eclipse/edc/protocol/dsp/transferprocess/dispatcher/delegate/TransferStartDelegate.java @@ -16,15 +16,13 @@ import jakarta.json.JsonObject; import okhttp3.Response; -import org.eclipse.edc.connector.transfer.spi.types.protocol.TransferStartMessage; import org.eclipse.edc.protocol.dsp.spi.dispatcher.DspHttpDispatcherDelegate; -import org.eclipse.edc.protocol.dsp.spi.serialization.JsonLdRemoteMessageSerializer; import java.util.function.Function; -public class TransferStartDelegate extends DspHttpDispatcherDelegate { +public class TransferStartDelegate extends DspHttpDispatcherDelegate { - public TransferStartDelegate(JsonLdRemoteMessageSerializer serializer) { + public TransferStartDelegate() { super(); } diff --git a/data-protocols/dsp/dsp-transfer-process/dsp-transfer-process-http-dispatcher/src/main/java/org/eclipse/edc/protocol/dsp/transferprocess/dispatcher/delegate/TransferTerminationDelegate.java b/data-protocols/dsp/dsp-transfer-process/dsp-transfer-process-http-dispatcher/src/main/java/org/eclipse/edc/protocol/dsp/transferprocess/dispatcher/delegate/TransferTerminationDelegate.java index 6481a1dd492..8caa1b5af1f 100644 --- a/data-protocols/dsp/dsp-transfer-process/dsp-transfer-process-http-dispatcher/src/main/java/org/eclipse/edc/protocol/dsp/transferprocess/dispatcher/delegate/TransferTerminationDelegate.java +++ b/data-protocols/dsp/dsp-transfer-process/dsp-transfer-process-http-dispatcher/src/main/java/org/eclipse/edc/protocol/dsp/transferprocess/dispatcher/delegate/TransferTerminationDelegate.java @@ -16,15 +16,13 @@ import jakarta.json.JsonObject; import okhttp3.Response; -import org.eclipse.edc.connector.transfer.spi.types.protocol.TransferTerminationMessage; import org.eclipse.edc.protocol.dsp.spi.dispatcher.DspHttpDispatcherDelegate; -import org.eclipse.edc.protocol.dsp.spi.serialization.JsonLdRemoteMessageSerializer; import java.util.function.Function; -public class TransferTerminationDelegate extends DspHttpDispatcherDelegate { +public class TransferTerminationDelegate extends DspHttpDispatcherDelegate { - public TransferTerminationDelegate(JsonLdRemoteMessageSerializer serializer) { + public TransferTerminationDelegate() { super(); } diff --git a/data-protocols/dsp/dsp-transfer-process/dsp-transfer-process-http-dispatcher/src/test/java/org/eclipse/edc/protocol/dsp/transferprocess/dispatcher/delegate/TransferCompletionDelegateTest.java b/data-protocols/dsp/dsp-transfer-process/dsp-transfer-process-http-dispatcher/src/test/java/org/eclipse/edc/protocol/dsp/transferprocess/dispatcher/delegate/TransferCompletionDelegateTest.java index faba2990943..826281f02ff 100644 --- a/data-protocols/dsp/dsp-transfer-process/dsp-transfer-process-http-dispatcher/src/test/java/org/eclipse/edc/protocol/dsp/transferprocess/dispatcher/delegate/TransferCompletionDelegateTest.java +++ b/data-protocols/dsp/dsp-transfer-process/dsp-transfer-process-http-dispatcher/src/test/java/org/eclipse/edc/protocol/dsp/transferprocess/dispatcher/delegate/TransferCompletionDelegateTest.java @@ -35,7 +35,7 @@ void parseResponse_returnNull() { } @Override - protected DspHttpDispatcherDelegate delegate() { + protected DspHttpDispatcherDelegate delegate() { return delegate; } } diff --git a/data-protocols/dsp/dsp-transfer-process/dsp-transfer-process-http-dispatcher/src/test/java/org/eclipse/edc/protocol/dsp/transferprocess/dispatcher/delegate/TransferRequestDelegateTest.java b/data-protocols/dsp/dsp-transfer-process/dsp-transfer-process-http-dispatcher/src/test/java/org/eclipse/edc/protocol/dsp/transferprocess/dispatcher/delegate/TransferRequestDelegateTest.java index 48e0b6bf07b..95c7141e9d7 100644 --- a/data-protocols/dsp/dsp-transfer-process/dsp-transfer-process-http-dispatcher/src/test/java/org/eclipse/edc/protocol/dsp/transferprocess/dispatcher/delegate/TransferRequestDelegateTest.java +++ b/data-protocols/dsp/dsp-transfer-process/dsp-transfer-process-http-dispatcher/src/test/java/org/eclipse/edc/protocol/dsp/transferprocess/dispatcher/delegate/TransferRequestDelegateTest.java @@ -26,7 +26,7 @@ class TransferRequestDelegateTest extends DspHttpDispatcherDelegateTestBase delegate() { + protected DspHttpDispatcherDelegate delegate() { return delegate; } diff --git a/data-protocols/dsp/dsp-transfer-process/dsp-transfer-process-http-dispatcher/src/test/java/org/eclipse/edc/protocol/dsp/transferprocess/dispatcher/delegate/TransferStartDelegateTest.java b/data-protocols/dsp/dsp-transfer-process/dsp-transfer-process-http-dispatcher/src/test/java/org/eclipse/edc/protocol/dsp/transferprocess/dispatcher/delegate/TransferStartDelegateTest.java index 83ec4bda372..5d49be8e3bb 100644 --- a/data-protocols/dsp/dsp-transfer-process/dsp-transfer-process-http-dispatcher/src/test/java/org/eclipse/edc/protocol/dsp/transferprocess/dispatcher/delegate/TransferStartDelegateTest.java +++ b/data-protocols/dsp/dsp-transfer-process/dsp-transfer-process-http-dispatcher/src/test/java/org/eclipse/edc/protocol/dsp/transferprocess/dispatcher/delegate/TransferStartDelegateTest.java @@ -26,7 +26,7 @@ class TransferStartDelegateTest extends DspHttpDispatcherDelegateTestBase delegate() { + protected DspHttpDispatcherDelegate delegate() { return delegate; } } diff --git a/data-protocols/dsp/dsp-transfer-process/dsp-transfer-process-http-dispatcher/src/test/java/org/eclipse/edc/protocol/dsp/transferprocess/dispatcher/delegate/TransferTerminationDelegateTest.java b/data-protocols/dsp/dsp-transfer-process/dsp-transfer-process-http-dispatcher/src/test/java/org/eclipse/edc/protocol/dsp/transferprocess/dispatcher/delegate/TransferTerminationDelegateTest.java index 6e44f1206e1..b4ab667aebb 100644 --- a/data-protocols/dsp/dsp-transfer-process/dsp-transfer-process-http-dispatcher/src/test/java/org/eclipse/edc/protocol/dsp/transferprocess/dispatcher/delegate/TransferTerminationDelegateTest.java +++ b/data-protocols/dsp/dsp-transfer-process/dsp-transfer-process-http-dispatcher/src/test/java/org/eclipse/edc/protocol/dsp/transferprocess/dispatcher/delegate/TransferTerminationDelegateTest.java @@ -26,7 +26,7 @@ class TransferTerminationDelegateTest extends DspHttpDispatcherDelegateTestBase< @BeforeEach void setUp() { - delegate = new TransferTerminationDelegate(serializer); + delegate = new TransferTerminationDelegate(); } @Test @@ -35,7 +35,7 @@ void parseResponse_returnNull() { } @Override - protected DspHttpDispatcherDelegate delegate() { + protected DspHttpDispatcherDelegate delegate() { return delegate; } }