From 008c0adc3712ba0aee6410e8cd7efc61f4cbeeac Mon Sep 17 00:00:00 2001 From: "puthuparambil.aditya" Date: Mon, 14 Dec 2020 15:46:30 +0000 Subject: Few Sonar Fixes Add spock-spring testing Issue-ID: CPS-89 Signed-off-by: puthuparambil.aditya Change-Id: I1e12fb56916e2123fc1d29bdf1524accbb9eeffd --- .../onap/cps/spi/CpsModulePersistenceService.java | 3 ++- .../org/onap/cps/spi/exceptions/CpsException.java | 22 ++-------------------- .../main/java/org/onap/cps/spi/model/DataNode.java | 3 --- 3 files changed, 4 insertions(+), 24 deletions(-) (limited to 'cps-service') diff --git a/cps-service/src/main/java/org/onap/cps/spi/CpsModulePersistenceService.java b/cps-service/src/main/java/org/onap/cps/spi/CpsModulePersistenceService.java index 9749d8b2e3..7feae367e8 100644 --- a/cps-service/src/main/java/org/onap/cps/spi/CpsModulePersistenceService.java +++ b/cps-service/src/main/java/org/onap/cps/spi/CpsModulePersistenceService.java @@ -31,13 +31,14 @@ public interface CpsModulePersistenceService { * TODO * clean up method to conform with spi proposal - https://jira.onap.org/browse/CPS-103 * Store the module from a yang model in the database. + * @deprecated * * @param namespace module namespace * @param moduleContent module content * @param revision module revision * @param dataspaceName the name of the dataspace the module is associated with */ - @Deprecated + @Deprecated(forRemoval = true) void storeModule(final String namespace, final String moduleContent, final String revision, final String dataspaceName); diff --git a/cps-service/src/main/java/org/onap/cps/spi/exceptions/CpsException.java b/cps-service/src/main/java/org/onap/cps/spi/exceptions/CpsException.java index 406ade688b..96a0678062 100644 --- a/cps-service/src/main/java/org/onap/cps/spi/exceptions/CpsException.java +++ b/cps-service/src/main/java/org/onap/cps/spi/exceptions/CpsException.java @@ -28,26 +28,8 @@ public class CpsException extends RuntimeException { private static final long serialVersionUID = 1592619410918497467L; - @Getter String details; - - /** - * Constructor. - * - * @param cause the cause of the exception - */ - public CpsException(final Throwable cause) { - super(cause.getMessage(), cause); - } - - /** - * Constructor. - * - * @param message the error message - * @param cause the cause of the exception - */ - public CpsException(final String message, final Throwable cause) { - super(message, cause); - } + @Getter + final String details; /** * Constructor. diff --git a/cps-service/src/main/java/org/onap/cps/spi/model/DataNode.java b/cps-service/src/main/java/org/onap/cps/spi/model/DataNode.java index 5ed45ad6e1..8bd4047007 100644 --- a/cps-service/src/main/java/org/onap/cps/spi/model/DataNode.java +++ b/cps-service/src/main/java/org/onap/cps/spi/model/DataNode.java @@ -24,9 +24,6 @@ import java.util.Collection; import java.util.Map; import lombok.Builder; import lombok.Data; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; @Data @Builder -- cgit 1.2.3-korg