From 2b8268f3c599c185fbef549583d0f9dcdcb3a861 Mon Sep 17 00:00:00 2001 From: egernug Date: Mon, 3 Jul 2023 10:09:09 +0100 Subject: [PATCH] Upgrade to Java 17 Upgrade CPS component to Java 17 Issue-ID:CPS-1767 Signed-off-by: egernug Change-Id: Ide1e75205851e025371b4822ee161f71f04a6af1 --- cps-application/pom.xml | 4 +++- cps-parent/pom.xml | 6 ++++-- .../test/groovy/org/onap/cps/spi/utils/SessionManagerSpec.groovy | 7 ++++--- spotbugs/src/main/resources/spotbugs-exclude.xml | 2 ++ 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/cps-application/pom.xml b/cps-application/pom.xml index 06f4edc63..4b28469ac 100755 --- a/cps-application/pom.xml +++ b/cps-application/pom.xml @@ -38,7 +38,7 @@ org.onap.cps.Application yyyyMMdd'T'HHmmss'Z' 0.82 - ${docker.pull.registry}/onap/integration-java11:8.0.0 + ${docker.pull.registry}/onap/integration-java17:12.0.0 ${project.version}-${maven.build.timestamp} @@ -126,6 +126,7 @@ com.google.cloud.tools jib-maven-plugin + 3.3.2 ${app} @@ -256,6 +257,7 @@ com.google.cloud.tools jib-maven-plugin + 3.3.2 diff --git a/cps-parent/pom.xml b/cps-parent/pom.xml index d5eb3d44c..913120dc6 100755 --- a/cps-parent/pom.xml +++ b/cps-parent/pom.xml @@ -37,7 +37,7 @@ org.onap.cps.Application - 11 + 17 0.97 42.5.1 @@ -153,7 +153,7 @@ com.github.spotbugs spotbugs-maven-plugin - 4.1.3 + 4.4.2 com.github.spotbugs @@ -357,6 +357,7 @@ org.jacoco jacoco-maven-plugin + 0.8.10 org/onap/cps/event/model/* @@ -402,6 +403,7 @@ org.sonarsource.scanner.maven sonar-maven-plugin + 3.9.1.2184 org.codehaus.mojo diff --git a/cps-ri/src/test/groovy/org/onap/cps/spi/utils/SessionManagerSpec.groovy b/cps-ri/src/test/groovy/org/onap/cps/spi/utils/SessionManagerSpec.groovy index db766cd1f..feda338b8 100644 --- a/cps-ri/src/test/groovy/org/onap/cps/spi/utils/SessionManagerSpec.groovy +++ b/cps-ri/src/test/groovy/org/onap/cps/spi/utils/SessionManagerSpec.groovy @@ -21,6 +21,7 @@ package org.onap.cps.spi.utils import com.google.common.util.concurrent.TimeLimiter +import com.google.common.util.concurrent.UncheckedExecutionException import org.hibernate.HibernateException import org.hibernate.Transaction import org.onap.cps.spi.config.CpsSessionFactory @@ -67,9 +68,9 @@ class SessionManagerSpec extends Specification { def thrown = thrown(SessionManagerException) thrown.details.contains(expectedExceptionDetail) where: - exceptionDuringTest || expectedExceptionDetail - new InterruptedException() || 'interrupted' - new ExecutionException() || 'aborted' + exceptionDuringTest || expectedExceptionDetail + new InterruptedException() || 'interrupted' + new UncheckedExecutionException() || 'aborted' } def 'Close a session' () { diff --git a/spotbugs/src/main/resources/spotbugs-exclude.xml b/spotbugs/src/main/resources/spotbugs-exclude.xml index d8731ac81..ab37f41ba 100644 --- a/spotbugs/src/main/resources/spotbugs-exclude.xml +++ b/spotbugs/src/main/resources/spotbugs-exclude.xml @@ -49,6 +49,8 @@ + + -- 2.16.6