From 1cef345e92ee93323b1220bac3ad3a90cb310406 Mon Sep 17 00:00:00 2001 From: niamhcore Date: Fri, 22 Jan 2021 14:05:00 +0000 Subject: Add DataNodeDoesNotExist Exception Issue-ID: CPS-182 Signed-off-by: niamhcore Change-Id: I05fdd0fbc207e4806c187b96d35d7b6c54b795ea --- .../src/main/java/org/onap/cps/spi/repository/FragmentRepository.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cps-ri/src/main/java/org/onap') diff --git a/cps-ri/src/main/java/org/onap/cps/spi/repository/FragmentRepository.java b/cps-ri/src/main/java/org/onap/cps/spi/repository/FragmentRepository.java index 6fc956c44d..bf551723f8 100755 --- a/cps-ri/src/main/java/org/onap/cps/spi/repository/FragmentRepository.java +++ b/cps-ri/src/main/java/org/onap/cps/spi/repository/FragmentRepository.java @@ -28,7 +28,7 @@ import org.checkerframework.checker.nullness.qual.NonNull; import org.onap.cps.spi.entities.AnchorEntity; import org.onap.cps.spi.entities.DataspaceEntity; import org.onap.cps.spi.entities.FragmentEntity; -import org.onap.cps.spi.exceptions.NotFoundInDataspaceException; +import org.onap.cps.spi.exceptions.DataNodeNotFoundException; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Modifying; import org.springframework.data.jpa.repository.Query; @@ -44,7 +44,7 @@ public interface FragmentRepository extends JpaRepository default FragmentEntity getByDataspaceAndAnchorAndXpath(@NonNull DataspaceEntity dataspaceEntity, @NonNull AnchorEntity anchorEntity, @NonNull String xpath) { return findByDataspaceAndAnchorAndXpath(dataspaceEntity, anchorEntity, xpath) - .orElseThrow(() -> new NotFoundInDataspaceException(dataspaceEntity.getName(), xpath)); + .orElseThrow(() -> new DataNodeNotFoundException(dataspaceEntity.getName(), anchorEntity.getName(), xpath)); } @Modifying -- cgit 1.2.3-korg