aboutsummaryrefslogtreecommitdiffstats
path: root/cps-ri/src/main/java/org/onap
diff options
context:
space:
mode:
authorwaqas.ikram <waqas.ikram@est.tech>2024-02-21 11:31:00 +0000
committerwaqas.ikram <waqas.ikram@est.tech>2024-02-22 17:21:37 +0000
commite7f8012e4fbd40757c45e6368539de4899cfe35a (patch)
treedd7c01df698d6c254027f9b968b7d19cc34bfa06 /cps-ri/src/main/java/org/onap
parent79bb5dafbed0e6dd779276ac80ae5549a834bcf5 (diff)
Uplift Spring Boot to 3.2.2
- Upgraded hypersistence-utils-hibernate-60 to hypersistence-utils-hibernate-63 - Introduced @Qualifier annotations where needed Issue-ID: CPS-2101 Change-Id: I8303592ed91584deb6ca5cd4e49800210b6ea989 Signed-off-by: waqas.ikram <waqas.ikram@est.tech>
Diffstat (limited to 'cps-ri/src/main/java/org/onap')
-rwxr-xr-xcps-ri/src/main/java/org/onap/cps/spi/impl/CpsModulePersistenceServiceImpl.java5
1 files changed, 3 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 1e42702ab5..b449a789b0 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
@@ -69,6 +69,7 @@ import org.opendaylight.yangtools.yang.model.repo.api.YangTextSchemaSource;
import org.opendaylight.yangtools.yang.parser.api.YangSyntaxErrorException;
import org.opendaylight.yangtools.yang.parser.rfc7950.repo.YangModelDependencyInfo;
import org.springframework.dao.DataIntegrityViolationException;
+import org.springframework.retry.RetryContext;
import org.springframework.retry.annotation.Backoff;
import org.springframework.retry.annotation.Retryable;
import org.springframework.retry.support.RetrySynchronizationManager;
@@ -277,8 +278,8 @@ public class CpsModulePersistenceServiceImpl implements CpsModulePersistenceServ
dataIntegrityViolationException, newYangResourceEntities);
convertedException.ifPresent(
e -> {
- int retryCount = RetrySynchronizationManager.getContext() == null ? 0
- : RetrySynchronizationManager.getContext().getRetryCount();
+ final RetryContext context = RetrySynchronizationManager.getContext();
+ int retryCount = context == null ? 0 : context.getRetryCount();
log.warn("Cannot persist duplicated yang resource. System will attempt this method "
+ "up to 5 times. Current retry count : {}", ++retryCount, e);
});