From 85754e6b0e411d015c5a181295e3c66670073fa3 Mon Sep 17 00:00:00 2001 From: Ernst-Christoph Schrewe Date: Mon, 9 Oct 2023 11:01:34 +0200 Subject: [PATCH] chore: some cleaning up & dependencies --- DEPENDENCIES_BACKEND | 2 +- backend/DEPENDENCIES | 2 +- .../domain/model/measurement/MeasurementUnit.java | 14 -------------- .../logic/service/ProductStockServiceImpl.java | 1 - 4 files changed, 2 insertions(+), 17 deletions(-) diff --git a/DEPENDENCIES_BACKEND b/DEPENDENCIES_BACKEND index d7ee2ac8..4066cbf6 100644 --- a/DEPENDENCIES_BACKEND +++ b/DEPENDENCIES_BACKEND @@ -24,7 +24,7 @@ maven/mavencentral/jakarta.annotation/jakarta.annotation-api/2.1.1, EPL-2.0 OR G maven/mavencentral/jakarta.inject/jakarta.inject-api/2.0.0, Apache-2.0, approved, clearlydefined maven/mavencentral/jakarta.persistence/jakarta.persistence-api/3.1.0, EPL-2.0 OR BSD-3-Clause AND (EPL-2.0 OR BSD-3-Clause AND BSD-3-Clause), approved, #7696 maven/mavencentral/jakarta.transaction/jakarta.transaction-api/2.0.1, EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0, approved, #7697 -maven/mavencentral/jakarta.validation/jakarta.validation-api/3.0.2, Apache-2.0, approved, clearlydefined +maven/mavencentral/jakarta.validation/jakarta.validation-api/3.0.2, Apache-2.0, approved, ee4j.validation maven/mavencentral/jakarta.xml.bind/jakarta.xml.bind-api/4.0.0, BSD-3-Clause, approved, ee4j.jaxb maven/mavencentral/net.bytebuddy/byte-buddy-agent/1.12.22, Apache-2.0, approved, #1810 maven/mavencentral/net.bytebuddy/byte-buddy/1.12.22, Apache-2.0 AND BSD-3-Clause, approved, #1811 diff --git a/backend/DEPENDENCIES b/backend/DEPENDENCIES index d7ee2ac8..4066cbf6 100644 --- a/backend/DEPENDENCIES +++ b/backend/DEPENDENCIES @@ -24,7 +24,7 @@ maven/mavencentral/jakarta.annotation/jakarta.annotation-api/2.1.1, EPL-2.0 OR G maven/mavencentral/jakarta.inject/jakarta.inject-api/2.0.0, Apache-2.0, approved, clearlydefined maven/mavencentral/jakarta.persistence/jakarta.persistence-api/3.1.0, EPL-2.0 OR BSD-3-Clause AND (EPL-2.0 OR BSD-3-Clause AND BSD-3-Clause), approved, #7696 maven/mavencentral/jakarta.transaction/jakarta.transaction-api/2.0.1, EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0, approved, #7697 -maven/mavencentral/jakarta.validation/jakarta.validation-api/3.0.2, Apache-2.0, approved, clearlydefined +maven/mavencentral/jakarta.validation/jakarta.validation-api/3.0.2, Apache-2.0, approved, ee4j.validation maven/mavencentral/jakarta.xml.bind/jakarta.xml.bind-api/4.0.0, BSD-3-Clause, approved, ee4j.jaxb maven/mavencentral/net.bytebuddy/byte-buddy-agent/1.12.22, Apache-2.0, approved, #1810 maven/mavencentral/net.bytebuddy/byte-buddy/1.12.22, Apache-2.0 AND BSD-3-Clause, approved, #1811 diff --git a/backend/src/main/java/org/eclipse/tractusx/puris/backend/stock/domain/model/measurement/MeasurementUnit.java b/backend/src/main/java/org/eclipse/tractusx/puris/backend/stock/domain/model/measurement/MeasurementUnit.java index d645fd54..e2521938 100644 --- a/backend/src/main/java/org/eclipse/tractusx/puris/backend/stock/domain/model/measurement/MeasurementUnit.java +++ b/backend/src/main/java/org/eclipse/tractusx/puris/backend/stock/domain/model/measurement/MeasurementUnit.java @@ -21,7 +21,6 @@ */ package org.eclipse.tractusx.puris.backend.stock.domain.model.measurement; -import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import org.eclipse.tractusx.puris.backend.stock.logic.dto.samm.ProductStockSammDto; @@ -67,17 +66,4 @@ public String jsonRepresentation() { return "unit:" + this; } - /** - * Maps the input to a MeasurementUnit by skipping the prefix "unit:" and evaluating the remainder. - * Needed for deserialization of the {@link ProductStockSammDto} - * - * @param value the input String to be parsed - * @return a MeasurementUnit or null - */ - @JsonCreator - public static MeasurementUnit parseStringFromJson(String value) { - value = value.startsWith("unit:") ? value.substring(5) : value; - return MeasurementUnit.valueOf(value); - } - } diff --git a/backend/src/main/java/org/eclipse/tractusx/puris/backend/stock/logic/service/ProductStockServiceImpl.java b/backend/src/main/java/org/eclipse/tractusx/puris/backend/stock/logic/service/ProductStockServiceImpl.java index da2d03ea..f28ccc37 100644 --- a/backend/src/main/java/org/eclipse/tractusx/puris/backend/stock/logic/service/ProductStockServiceImpl.java +++ b/backend/src/main/java/org/eclipse/tractusx/puris/backend/stock/logic/service/ProductStockServiceImpl.java @@ -23,7 +23,6 @@ import lombok.extern.slf4j.Slf4j; import org.eclipse.tractusx.puris.backend.masterdata.domain.model.Material; -import org.eclipse.tractusx.puris.backend.masterdata.domain.model.MaterialPartnerRelation; import org.eclipse.tractusx.puris.backend.masterdata.domain.model.Partner; import org.eclipse.tractusx.puris.backend.masterdata.domain.repository.MaterialRepository; import org.eclipse.tractusx.puris.backend.masterdata.logic.service.MaterialPartnerRelationService;