From 1ed3f28bd0f07996145dc07aba594aa8a65f0b11 Mon Sep 17 00:00:00 2001 From: ds-lcapellino Date: Wed, 17 Jul 2024 16:18:14 +0200 Subject: [PATCH] chore: #XXX fix high findings --- .../traceability/policies/infrastructure/PolicyClient.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/policies/infrastructure/PolicyClient.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/policies/infrastructure/PolicyClient.java index d0de0fe191..23476cc552 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/policies/infrastructure/PolicyClient.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/policies/infrastructure/PolicyClient.java @@ -19,6 +19,7 @@ package org.eclipse.tractusx.traceability.policies.infrastructure; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang.StringUtils; import org.eclipse.tractusx.irs.edc.client.policy.Constraint; import org.eclipse.tractusx.irs.edc.client.policy.Constraints; import org.eclipse.tractusx.irs.edc.client.policy.Operator; @@ -46,7 +47,6 @@ import java.time.ZoneOffset; import java.util.List; import java.util.Map; -import java.util.Optional; import java.util.UUID; import static org.eclipse.tractusx.traceability.common.config.RestTemplateConfiguration.IRS_ADMIN_TEMPLATE; @@ -72,8 +72,8 @@ public Map> getPolicies() { if (body != null) { body.forEach((key, valueList) -> { - log.info("Key: {}", key); - valueList.forEach(value -> log.info("Policy: {}", value)); + log.info("Key: {}", StringUtils.normalizeSpace(key)); + valueList.forEach(value -> log.info("Policy: {}", StringUtils.normalizeSpace(value.toString()))); }); } else { log.info("No policies retrieved from IRS Policy Store");