diff options
author | Joseph Keenan <joseph.keenan@est.tech> | 2022-10-18 09:13:22 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2022-10-18 09:13:22 +0000 |
commit | 5ced56253a01fadf5376bc5e1202a7ac7e136794 (patch) | |
tree | 01367c5740116af0126c39622a49ac5fa2e43d26 /cps-ncmp-rest | |
parent | a083f7c9128d19b211f6022d6723a8d4bc9d0f76 (diff) | |
parent | 69563ed36cd4aa6876aee517c9c228d94e52ba91 (diff) |
Merge "Fix SonarQube Violations"
Diffstat (limited to 'cps-ncmp-rest')
-rw-r--r-- | cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/util/TopicValidator.java | 3 | ||||
-rw-r--r-- | cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/util/TopicValidatorSpec.groovy | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/util/TopicValidator.java b/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/util/TopicValidator.java index 313e7bc012..6a46fbd638 100644 --- a/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/util/TopicValidator.java +++ b/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/util/TopicValidator.java @@ -21,8 +21,11 @@ package org.onap.cps.ncmp.rest.util; import java.util.regex.Pattern; +import lombok.AccessLevel; +import lombok.NoArgsConstructor; import org.onap.cps.ncmp.rest.exceptions.InvalidTopicException; +@NoArgsConstructor(access = AccessLevel.PRIVATE) public class TopicValidator { private static final Pattern TOPIC_NAME_PATTERN = Pattern.compile("^[a-zA-Z0-9]([._-](?![._-])|" diff --git a/cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/util/TopicValidatorSpec.groovy b/cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/util/TopicValidatorSpec.groovy index e626e1505d..15e2c1c6a0 100644 --- a/cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/util/TopicValidatorSpec.groovy +++ b/cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/util/TopicValidatorSpec.groovy @@ -43,5 +43,4 @@ class TopicValidatorSpec extends Specification { 'blank topic' | ' ' 'invalid non empty topic' | '1_5_*_#' } - } |