From 3057854ce8807de7515c9b85a9a9f9d9742f78e5 Mon Sep 17 00:00:00 2001 From: "puthuparambil.aditya" Date: Sun, 6 Dec 2020 22:18:16 +0000 Subject: CPS Exception handling - extending the CPSValidationException Issue-ID: CPS-8 Signed-off-by: puthuparambil.aditya Change-Id: Id0728dad26edd79e3853c0d32c8e27dc7bedd369 --- .../main/java/org/onap/cps/spi/repository/DataspaceRepository.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cps-ri/src/main/java') diff --git a/cps-ri/src/main/java/org/onap/cps/spi/repository/DataspaceRepository.java b/cps-ri/src/main/java/org/onap/cps/spi/repository/DataspaceRepository.java index daf0b716b7..4b649167f3 100755 --- a/cps-ri/src/main/java/org/onap/cps/spi/repository/DataspaceRepository.java +++ b/cps-ri/src/main/java/org/onap/cps/spi/repository/DataspaceRepository.java @@ -21,7 +21,7 @@ package org.onap.cps.spi.repository; import java.util.Optional; import javax.validation.constraints.NotNull; -import org.onap.cps.exceptions.CpsNotFoundException; +import org.onap.cps.exceptions.DataspaceNotFoundException; import org.onap.cps.spi.entities.Dataspace; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; @@ -34,6 +34,6 @@ public interface DataspaceRepository extends JpaRepository { default Dataspace getByName(@NotNull String name) { return findByName(name).orElseThrow( - () -> new CpsNotFoundException("Not Found", "Dataspace " + name + " does not exist.")); + () -> new DataspaceNotFoundException("Dataspace " + name + " does not exist.")); } } \ No newline at end of file -- cgit 1.2.3-korg