From b3f7b3bb87a6bd90373d3d71e328df3aaf13e212 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Fuch=C3=9F?= Date: Thu, 5 Dec 2024 10:42:27 +0100 Subject: [PATCH] Remove deep copy of Data Repository, since states are not all serializable --- .../mcse/ardoco/core/data/DataRepository.java | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/framework/common/src/main/java/edu/kit/kastel/mcse/ardoco/core/data/DataRepository.java b/framework/common/src/main/java/edu/kit/kastel/mcse/ardoco/core/data/DataRepository.java index 95acacf39..473a744a4 100644 --- a/framework/common/src/main/java/edu/kit/kastel/mcse/ardoco/core/data/DataRepository.java +++ b/framework/common/src/main/java/edu/kit/kastel/mcse/ardoco/core/data/DataRepository.java @@ -9,8 +9,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import edu.kit.kastel.mcse.ardoco.core.common.util.DataRepositoryHelper; - /** * This class represents a data repository that can be used to store and fetch certain data ({@link PipelineStepData}. Data can be added and fetched with the * help of a data identifier (as string). Fetching also needs the necessary class of data that is expected. @@ -41,7 +39,7 @@ public Optional getData(String identifier, Class if (possibleData != null) { return possibleData.asPipelineStepData(clazz); } - logger.warn("Could not find data for id '{}'", identifier); + DataRepository.logger.warn("Could not find data for id '{}'", identifier); return Optional.empty(); } @@ -53,7 +51,7 @@ public Optional getData(String identifier, Class */ public void addData(String identifier, PipelineStepData pipelineStepData) { if (this.data.put(identifier, pipelineStepData) != null) { - logger.warn("Overriding data with identifier '{}'", identifier); + DataRepository.logger.warn("Overriding data with identifier '{}'", identifier); } } @@ -65,13 +63,4 @@ public void addData(String identifier, PipelineStepData pipelineStepData) { public void addAllData(DataRepository dataRepository) { this.data.putAll(dataRepository.data); } - - /** - * Creates a deep copy of the data repository using serialization. - * - * @return deep copy of the data repository - */ - public DataRepository deepCopy() { - return DataRepositoryHelper.deepCopy(this); - } }