From d9fe3582c963209a2841b2ec2ca0e5cfe17ea887 Mon Sep 17 00:00:00 2001 From: niamhcore Date: Tue, 13 Jul 2021 15:24:29 +0100 Subject: Fix sonar qube violations Issue-ID: CPS-475 Signed-off-by: niamhcore Change-Id: If55140bbf3e5b28e8e9334838d1a81b74619c99d --- .../java/org/onap/cps/spi/impl/CpsModulePersistenceServiceImpl.java | 3 +-- 1 file changed, 1 insertion(+), 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); } -- cgit 1.2.3-korg