From d6f692040b13a68c3df40cd5feff0f428f01e123 Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Fri, 2 Aug 2024 04:47:47 +0200 Subject: [PATCH 1/2] fix(exception-handling): [#841] PMD --- .../irs/testing/wiremock/DiscoveryServiceWiremockSupport.java | 1 + .../irs/testing/wiremock/SubmodelFacadeWiremockSupport.java | 1 + 2 files changed, 2 insertions(+) diff --git a/irs-testing/src/main/java/org/eclipse/tractusx/irs/testing/wiremock/DiscoveryServiceWiremockSupport.java b/irs-testing/src/main/java/org/eclipse/tractusx/irs/testing/wiremock/DiscoveryServiceWiremockSupport.java index a4c91d3d3..41f6dcc03 100644 --- a/irs-testing/src/main/java/org/eclipse/tractusx/irs/testing/wiremock/DiscoveryServiceWiremockSupport.java +++ b/irs-testing/src/main/java/org/eclipse/tractusx/irs/testing/wiremock/DiscoveryServiceWiremockSupport.java @@ -33,6 +33,7 @@ /** * WireMock configurations and requests used for testing the Discovery Service flow. */ +@SuppressWarnings("PMD.TooManyMethods") public final class DiscoveryServiceWiremockSupport { public static final String CONTROLPLANE_PUBLIC_URL = "https://test.edc.io"; public static final String EDC_DISCOVERY_PATH = "/edcDiscovery"; diff --git a/irs-testing/src/main/java/org/eclipse/tractusx/irs/testing/wiremock/SubmodelFacadeWiremockSupport.java b/irs-testing/src/main/java/org/eclipse/tractusx/irs/testing/wiremock/SubmodelFacadeWiremockSupport.java index 7e98522c9..c95aa4074 100644 --- a/irs-testing/src/main/java/org/eclipse/tractusx/irs/testing/wiremock/SubmodelFacadeWiremockSupport.java +++ b/irs-testing/src/main/java/org/eclipse/tractusx/irs/testing/wiremock/SubmodelFacadeWiremockSupport.java @@ -29,6 +29,7 @@ /** * WireMock configurations and requests used for testing the EDC Flow. */ +@SuppressWarnings("PMD.TooManyMethods") public final class SubmodelFacadeWiremockSupport { public static final String PATH_CATALOG = "/catalog/request"; public static final String PATH_NEGOTIATE = "/contractnegotiations"; From 1a6a677f4612de304024ecc2607d206bf874c845 Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Fri, 2 Aug 2024 11:05:12 +0200 Subject: [PATCH 2/2] fix(exception-handling): [#841] fix checkstyle warning replace tabs with spaces --- .../SubmodelFacadeWiremockSupport.java | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/irs-testing/src/main/java/org/eclipse/tractusx/irs/testing/wiremock/SubmodelFacadeWiremockSupport.java b/irs-testing/src/main/java/org/eclipse/tractusx/irs/testing/wiremock/SubmodelFacadeWiremockSupport.java index c95aa4074..86abd6742 100644 --- a/irs-testing/src/main/java/org/eclipse/tractusx/irs/testing/wiremock/SubmodelFacadeWiremockSupport.java +++ b/irs-testing/src/main/java/org/eclipse/tractusx/irs/testing/wiremock/SubmodelFacadeWiremockSupport.java @@ -126,30 +126,30 @@ public static void prepareEmptyCatalog(final String bpn, final String edcUrl) { stubFor(post(urlPathEqualTo(PATH_CATALOG)).willReturn( WireMockConfig.responseWithStatus(STATUS_CODE_OK).withBody(""" { - "@id": "6af0d267-aaed-4d2e-86bb-adf391597fbe", - "@type": "dcat:Catalog", - "dspace:participantId": "%s", - "dcat:dataset": [], - "dcat:service": { - "@id": "75b09a2c-e7f9-4d15-bd67-334c50f35c48", - "@type": "dcat:DataService", - "dcat:endpointDescription": "dspace:connector", - "dcat:endpointUrl": "%s", - "dct:terms": "dspace:connector", - "dct:endpointUrl": "%s" - }, - "participantId": "%s", - "@context": { - "@vocab": "https://w3id.org/edc/v0.0.1/ns/", - "edc": "https://w3id.org/edc/v0.0.1/ns/", - "tx": "https://w3id.org/tractusx/v0.0.1/ns/", - "tx-auth": "https://w3id.org/tractusx/auth/", - "cx-policy": "https://w3id.org/catenax/policy/", - "dcat": "http://www.w3.org/ns/dcat#", - "dct": "http://purl.org/dc/terms/", - "odrl": "http://www.w3.org/ns/odrl/2/", - "dspace": "https://w3id.org/dspace/v0.8/" - } + "@id": "6af0d267-aaed-4d2e-86bb-adf391597fbe", + "@type": "dcat:Catalog", + "dspace:participantId": "%s", + "dcat:dataset": [], + "dcat:service": { + "@id": "75b09a2c-e7f9-4d15-bd67-334c50f35c48", + "@type": "dcat:DataService", + "dcat:endpointDescription": "dspace:connector", + "dcat:endpointUrl": "%s", + "dct:terms": "dspace:connector", + "dct:endpointUrl": "%s" + }, + "participantId": "%s", + "@context": { + "@vocab": "https://w3id.org/edc/v0.0.1/ns/", + "edc": "https://w3id.org/edc/v0.0.1/ns/", + "tx": "https://w3id.org/tractusx/v0.0.1/ns/", + "tx-auth": "https://w3id.org/tractusx/auth/", + "cx-policy": "https://w3id.org/catenax/policy/", + "dcat": "http://www.w3.org/ns/dcat#", + "dct": "http://purl.org/dc/terms/", + "odrl": "http://www.w3.org/ns/odrl/2/", + "dspace": "https://w3id.org/dspace/v0.8/" + } } """.formatted(bpn, edcUrl, edcUrl, bpn)))); }