diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/contracts/infrastructure/repository/ContractNotificationRepositoryImpl.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/contracts/infrastructure/repository/ContractNotificationRepositoryImpl.java index 1772160967..1c7e92b3d1 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/contracts/infrastructure/repository/ContractNotificationRepositoryImpl.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/contracts/infrastructure/repository/ContractNotificationRepositoryImpl.java @@ -30,7 +30,6 @@ import org.springframework.stereotype.Component; import java.util.List; -import java.util.stream.Collectors; @Component @Slf4j @@ -51,8 +50,8 @@ public void saveAllContractAgreements(List contractAgreementIds, Contrac .contractAgreementId(contractAgreementId) .type(contractType) .build()) - .map(entity -> (ContractAgreementBaseEntity) entity) - .collect(Collectors.toList()); + .map(ContractAgreementBaseEntity.class::cast) + .toList(); List contracts = fetchEdcContractAgreements(contractAgreementEntities); List contractAgreementsUpdated = ContractAgreementNotificationEntity.fromList(contracts, contractType); diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/contracts/infrastructure/repository/ContractViewRepositoryImpl.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/contracts/infrastructure/repository/ContractViewRepositoryImpl.java index c9b086a223..36b13de488 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/contracts/infrastructure/repository/ContractViewRepositoryImpl.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/contracts/infrastructure/repository/ContractViewRepositoryImpl.java @@ -45,7 +45,9 @@ public class ContractViewRepositoryImpl extends ContractRepositoryImplBase imple private final JpaContractAgreementViewRepository contractAgreementRepository; - public ContractViewRepositoryImpl(EdcContractAgreementService edcContractAgreementService, ObjectMapper objectMapper, EdcContractAgreementService edcContractAgreementService1, JpaContractAgreementViewRepository contractAgreementRepository, ObjectMapper objectMapper1) { + public ContractViewRepositoryImpl(EdcContractAgreementService edcContractAgreementService, + ObjectMapper objectMapper, + JpaContractAgreementViewRepository contractAgreementRepository) { super(edcContractAgreementService, objectMapper); this.contractAgreementRepository = contractAgreementRepository; }