From 951224abd04ec397b26318ac0ecd74fff7ce026c Mon Sep 17 00:00:00 2001 From: iadgovuser29 <33426478+iadgovuser29@users.noreply.github.com> Date: Thu, 13 Jun 2024 09:26:39 -0400 Subject: [PATCH] Test repository change --- .../entity/manager/SupplyChainValidationSummaryRepository.java | 2 ++ .../persist/service/SupplyChainValidationService.java | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/entity/manager/SupplyChainValidationSummaryRepository.java b/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/entity/manager/SupplyChainValidationSummaryRepository.java index e56f931b..94131b5d 100644 --- a/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/entity/manager/SupplyChainValidationSummaryRepository.java +++ b/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/entity/manager/SupplyChainValidationSummaryRepository.java @@ -1,5 +1,6 @@ package hirs.attestationca.persist.entity.manager; +import hirs.attestationca.persist.entity.userdefined.Device; import hirs.attestationca.persist.entity.userdefined.SupplyChainValidationSummary; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; @@ -9,4 +10,5 @@ import java.util.UUID; @Repository public interface SupplyChainValidationSummaryRepository extends JpaRepository { SupplyChainValidationSummary findByDevice(String device); + SupplyChainValidationSummary findByDevice(Device device); } diff --git a/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/service/SupplyChainValidationService.java b/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/service/SupplyChainValidationService.java index c01b0075..0040a754 100644 --- a/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/service/SupplyChainValidationService.java +++ b/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/service/SupplyChainValidationService.java @@ -359,7 +359,8 @@ public class SupplyChainValidationService { // Generate validation summary, save it, and return it. List validations = new ArrayList<>(); SupplyChainValidationSummary previous - = this.supplyChainValidationSummaryRepository.findByDevice(deviceName); + //= this.supplyChainValidationSummaryRepository.findByDevice(deviceName); + = this.supplyChainValidationSummaryRepository.findByDevice(device); for (SupplyChainValidation scv : previous.getValidations()) { if (scv.getValidationType() != SupplyChainValidation.ValidationType.FIRMWARE) { validations.add(ValidationService.buildValidationRecord(scv.getValidationType(),