summaryrefslogtreecommitdiffstats
path: root/cps-service/src/main/java
diff options
context:
space:
mode:
authorToineSiebelink <toine.siebelink@est.tech>2021-01-14 11:29:40 +0000
committerToineSiebelink <toine.siebelink@est.tech>2021-01-14 14:22:06 +0000
commitb7359210ff315cf9b1daf251da452fb48217b051 (patch)
tree58938ab100c5c209e4deaa0f4257516d9c5b8bd0 /cps-service/src/main/java
parentd45b2dc0ec3bb7d56ef1eee784a887459f609832 (diff)
SonarQube fixes
- Ignore SonarQube violations related to inheritance depth for exception classes - Increase coverage service module Issue-ID: CPS-89 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: I7998dee0f9abea0638639e0587b08febad6075f5
Diffstat (limited to 'cps-service/src/main/java')
-rw-r--r--cps-service/src/main/java/org/onap/cps/spi/exceptions/AnchorAlreadyDefinedException.java5
-rw-r--r--cps-service/src/main/java/org/onap/cps/spi/exceptions/DataspaceAlreadyDefinedException.java2
-rw-r--r--cps-service/src/main/java/org/onap/cps/spi/exceptions/DataspaceNotFoundException.java3
-rw-r--r--cps-service/src/main/java/org/onap/cps/spi/exceptions/NotFoundInDataspaceException.java5
-rw-r--r--cps-service/src/main/java/org/onap/cps/spi/exceptions/SchemaSetAlreadyDefinedException.java3
-rw-r--r--cps-service/src/main/java/org/onap/cps/spi/exceptions/SchemaSetNotFoundException.java7
6 files changed, 20 insertions, 5 deletions
diff --git a/cps-service/src/main/java/org/onap/cps/spi/exceptions/AnchorAlreadyDefinedException.java b/cps-service/src/main/java/org/onap/cps/spi/exceptions/AnchorAlreadyDefinedException.java
index efdb86e970..2a4abad319 100644
--- a/cps-service/src/main/java/org/onap/cps/spi/exceptions/AnchorAlreadyDefinedException.java
+++ b/cps-service/src/main/java/org/onap/cps/spi/exceptions/AnchorAlreadyDefinedException.java
@@ -19,6 +19,11 @@
package org.onap.cps.spi.exceptions;
+/**
+ * Anchor already defined exception. Indicates the an anchor with same name already exists in the same dataspace
+ */
+
+@SuppressWarnings("squid:S110") // Team agreed to accept 6 levels of inheritance for CPS Exceptions
public class AnchorAlreadyDefinedException extends CpsAdminException {
private static final long serialVersionUID = 5744381546778730691L;
diff --git a/cps-service/src/main/java/org/onap/cps/spi/exceptions/DataspaceAlreadyDefinedException.java b/cps-service/src/main/java/org/onap/cps/spi/exceptions/DataspaceAlreadyDefinedException.java
index d6d933c66e..fcc085aa08 100644
--- a/cps-service/src/main/java/org/onap/cps/spi/exceptions/DataspaceAlreadyDefinedException.java
+++ b/cps-service/src/main/java/org/onap/cps/spi/exceptions/DataspaceAlreadyDefinedException.java
@@ -22,6 +22,8 @@ package org.onap.cps.spi.exceptions;
/**
* Dataspace already defined exception. Indicates the dataspace with same name already exists.
*/
+
+@SuppressWarnings("squid:S110") // Team agreed to accept 6 levels of inheritance for CPS Exceptions
public class DataspaceAlreadyDefinedException extends CpsAdminException {
private static final long serialVersionUID = -5813793951842079228L;
diff --git a/cps-service/src/main/java/org/onap/cps/spi/exceptions/DataspaceNotFoundException.java b/cps-service/src/main/java/org/onap/cps/spi/exceptions/DataspaceNotFoundException.java
index 58fcde3d14..42b77a23be 100644
--- a/cps-service/src/main/java/org/onap/cps/spi/exceptions/DataspaceNotFoundException.java
+++ b/cps-service/src/main/java/org/onap/cps/spi/exceptions/DataspaceNotFoundException.java
@@ -19,10 +19,11 @@
package org.onap.cps.spi.exceptions;
-
/**
* Dataspace Not Found Exception. Indicates the requested data being absent.
*/
+
+@SuppressWarnings("squid:S110") // Team agreed to accept 6 levels of inheritance for CPS Exceptions
public class DataspaceNotFoundException extends CpsAdminException {
private static final long serialVersionUID = -1852996415384288431L;
diff --git a/cps-service/src/main/java/org/onap/cps/spi/exceptions/NotFoundInDataspaceException.java b/cps-service/src/main/java/org/onap/cps/spi/exceptions/NotFoundInDataspaceException.java
index 66cce1bfce..56a2f87433 100644
--- a/cps-service/src/main/java/org/onap/cps/spi/exceptions/NotFoundInDataspaceException.java
+++ b/cps-service/src/main/java/org/onap/cps/spi/exceptions/NotFoundInDataspaceException.java
@@ -19,12 +19,11 @@
package org.onap.cps.spi.exceptions;
-
/**
- * CP Service exception. Indicates the requested data being absent in a given dataspace
+ * Not found in dataspace exception. Indicates the requested data being absent in a given dataspace
*/
public class NotFoundInDataspaceException extends CpsException {
-
+
private static final long serialVersionUID = 3838769447129047713L;
public NotFoundInDataspaceException(final String dataspaceName, final String descriptionOfObject) {
diff --git a/cps-service/src/main/java/org/onap/cps/spi/exceptions/SchemaSetAlreadyDefinedException.java b/cps-service/src/main/java/org/onap/cps/spi/exceptions/SchemaSetAlreadyDefinedException.java
index b3766726f0..9376d6893d 100644
--- a/cps-service/src/main/java/org/onap/cps/spi/exceptions/SchemaSetAlreadyDefinedException.java
+++ b/cps-service/src/main/java/org/onap/cps/spi/exceptions/SchemaSetAlreadyDefinedException.java
@@ -19,6 +19,9 @@
package org.onap.cps.spi.exceptions;
+/**
+ * Schema set already defined exception. Indicates the a schema set with same name already exists in the same dataspace
+ */
public class SchemaSetAlreadyDefinedException extends CpsAdminException {
private static final long serialVersionUID = 501929839139881112L;
diff --git a/cps-service/src/main/java/org/onap/cps/spi/exceptions/SchemaSetNotFoundException.java b/cps-service/src/main/java/org/onap/cps/spi/exceptions/SchemaSetNotFoundException.java
index f92ca37298..cf63f924fd 100644
--- a/cps-service/src/main/java/org/onap/cps/spi/exceptions/SchemaSetNotFoundException.java
+++ b/cps-service/src/main/java/org/onap/cps/spi/exceptions/SchemaSetNotFoundException.java
@@ -19,6 +19,11 @@
package org.onap.cps.spi.exceptions;
+/**
+ * Schema set not found exception. Indicates the schema set is not found in a given dataspace
+ */
+
+@SuppressWarnings("squid:S110") // Team agreed to accept 6 levels of inheritance for CPS Exceptions
public class SchemaSetNotFoundException extends CpsAdminException {
private static final long serialVersionUID = 7422782395935450035L;
@@ -33,4 +38,4 @@ public class SchemaSetNotFoundException extends CpsAdminException {
super("Schema Set not found.",
String.format("Schema Set with name %s was not found for dataspace %s.", schemaSetName, dataspaceName));
}
-} \ No newline at end of file
+}