summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoregernug <gerard.nugent@est.tech>2023-07-03 10:09:09 +0100
committeregernug <gerard.nugent@est.tech>2023-07-13 10:49:36 +0100
commit2b8268f3c599c185fbef549583d0f9dcdcb3a861 (patch)
tree7aa92be824d7fedd2c27bcfb969da78364a0feb2
parentdb2db56f3358fa8dcccc864e04b490b307877c33 (diff)
Upgrade to Java 17
Upgrade CPS component to Java 17 Issue-ID:CPS-1767 Signed-off-by: egernug <gerard.nugent@est.tech> Change-Id: Ide1e75205851e025371b4822ee161f71f04a6af1
-rwxr-xr-xcps-application/pom.xml4
-rwxr-xr-xcps-parent/pom.xml6
-rw-r--r--cps-ri/src/test/groovy/org/onap/cps/spi/utils/SessionManagerSpec.groovy7
-rw-r--r--spotbugs/src/main/resources/spotbugs-exclude.xml2
4 files changed, 13 insertions, 6 deletions
diff --git a/cps-application/pom.xml b/cps-application/pom.xml
index 06f4edc633..4b28469ac7 100755
--- a/cps-application/pom.xml
+++ b/cps-application/pom.xml
@@ -38,7 +38,7 @@
<app>org.onap.cps.Application</app>
<maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
<minimum-coverage>0.82</minimum-coverage>
- <base.image>${docker.pull.registry}/onap/integration-java11:8.0.0</base.image>
+ <base.image>${docker.pull.registry}/onap/integration-java17:12.0.0</base.image>
<image.tag>${project.version}-${maven.build.timestamp}</image.tag>
</properties>
@@ -126,6 +126,7 @@
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
+ <version>3.3.2</version>
<configuration>
<container>
<mainClass>${app}</mainClass>
@@ -256,6 +257,7 @@
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
+ <version>3.3.2</version>
</plugin>
</plugins>
</build>
diff --git a/cps-parent/pom.xml b/cps-parent/pom.xml
index d5eb3d44cd..913120dc68 100755
--- a/cps-parent/pom.xml
+++ b/cps-parent/pom.xml
@@ -37,7 +37,7 @@
<properties>
<app>org.onap.cps.Application</app>
- <java.version>11</java.version>
+ <java.version>17</java.version>
<minimum-coverage>0.97</minimum-coverage>
<postgres.version>42.5.1</postgres.version>
@@ -153,7 +153,7 @@
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
- <version>4.1.3</version>
+ <version>4.4.2</version>
<dependencies>
<dependency>
<groupId>com.github.spotbugs</groupId>
@@ -357,6 +357,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
+ <version>0.8.10</version>
<configuration>
<excludes>
<exclude>org/onap/cps/event/model/*</exclude>
@@ -402,6 +403,7 @@
<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
+ <version>3.9.1.2184</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
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 db766cd1f3..feda338b80 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 d8731ac818..ab37f41bae 100644
--- a/spotbugs/src/main/resources/spotbugs-exclude.xml
+++ b/spotbugs/src/main/resources/spotbugs-exclude.xml
@@ -49,6 +49,8 @@
<!-- https://github.com/spotbugs/spotbugs/issues/756. spotbugs does not grok Java 11's try-with-resources -->
<Bug pattern="RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE"/>
+ <Bug pattern="EI_EXPOSE_REP"/>
+ <Bug pattern="EI_EXPOSE_REP2"/>
</Or>
</Match>