diff options
author | Priyank Maheshwari <priyank.maheshwari@est.tech> | 2024-02-26 10:32:19 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2024-02-26 10:32:19 +0000 |
commit | a2476b0fab7a68055bd0a4c11487fb11d4706497 (patch) | |
tree | 7c13d5f005691a35bd026d92c88d6f7afcd43062 /cps-ri | |
parent | 364fa197ec6e2f91f5975798d125a012a1a97be9 (diff) | |
parent | e7f8012e4fbd40757c45e6368539de4899cfe35a (diff) |
Merge "Uplift Spring Boot to 3.2.2"
Diffstat (limited to 'cps-ri')
-rw-r--r-- | cps-ri/pom.xml | 2 | ||||
-rwxr-xr-x | cps-ri/src/main/java/org/onap/cps/spi/impl/CpsModulePersistenceServiceImpl.java | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/cps-ri/pom.xml b/cps-ri/pom.xml index e25f152af5..2801d64a35 100644 --- a/cps-ri/pom.xml +++ b/cps-ri/pom.xml @@ -71,7 +71,7 @@ <!-- Add Hibernate support for Postgres datatype JSONB and Postgres arrays -->
<dependency>
<groupId>io.hypersistence</groupId>
- <artifactId>hypersistence-utils-hibernate-60</artifactId>
+ <artifactId>hypersistence-utils-hibernate-63</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
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); }); |