summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorniamhcore <niamh.core@est.tech>2021-07-13 15:24:29 +0100
committerniamhcore <niamh.core@est.tech>2021-07-13 15:44:52 +0100
commitd9fe3582c963209a2841b2ec2ca0e5cfe17ea887 (patch)
tree52505945b2d3388612a30083e00f4410053514ea
parent15b93e7ad7db7372d51c4c1ad45f95d463aaaffc (diff)
Fix sonar qube violations
Issue-ID: CPS-475 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: If55140bbf3e5b28e8e9334838d1a81b74619c99d
-rwxr-xr-xcps-ri/src/main/java/org/onap/cps/spi/impl/CpsModulePersistenceServiceImpl.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/cps-ri/src/main/java/org/onap/cps/spi/impl/CpsModulePersistenceServiceImpl.java b/cps-ri/src/main/java/org/onap/cps/spi/impl/CpsModulePersistenceServiceImpl.java
index 972807b727..1b3dc2486f 100755
--- a/cps-ri/src/main/java/org/onap/cps/spi/impl/CpsModulePersistenceServiceImpl.java
+++ b/cps-ri/src/main/java/org/onap/cps/spi/impl/CpsModulePersistenceServiceImpl.java
@@ -29,7 +29,6 @@ import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
-import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
import javax.transaction.Transactional;
@@ -186,7 +185,7 @@ public class CpsModulePersistenceServiceImpl implements CpsModulePersistenceServ
*/
private String getDuplicatedChecksumFromException(final ConstraintViolationException exception) {
String checksum = null;
- final Matcher matcher = CHECKSUM_EXCEPTION_PATTERN.matcher(exception.getSQLException().getMessage());
+ final var matcher = CHECKSUM_EXCEPTION_PATTERN.matcher(exception.getSQLException().getMessage());
if (matcher.find() && matcher.groupCount() == 1) {
checksum = matcher.group(1);
}