From: Fiete Ostkamp Date: Fri, 30 May 2025 13:53:36 +0000 (+0200) Subject: Spring-boot 3.1 update X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=1107d9814995eb2170e79788fe1dc5b600620023;p=aai%2Faai-common.git Spring-boot 3.1 update - update spring-boot (3.0.13 -> 3.1.12) - upgrade eclipse persistence (3.0.1 -> 4.0.6) - bump snapshot version to 1.16.1-SNAPSHOT Issue-ID: AAI-4162 Change-Id: I6988f36c00a0e8a9e9e32006b86ff286479ba685 Signed-off-by: Fiete Ostkamp --- diff --git a/aai-annotations/pom.xml b/aai-annotations/pom.xml index 9352ebf3..fc390020 100644 --- a/aai-annotations/pom.xml +++ b/aai-annotations/pom.xml @@ -27,7 +27,7 @@ org.onap.aai.aai-common aai-parent - 1.16.0-SNAPSHOT + 1.16.1-SNAPSHOT ../aai-parent/pom.xml aai-annotations diff --git a/aai-auth/pom.xml b/aai-auth/pom.xml index 7b450144..40c90141 100644 --- a/aai-auth/pom.xml +++ b/aai-auth/pom.xml @@ -27,7 +27,7 @@ org.onap.aai.aai-common aai-parent - 1.16.0-SNAPSHOT + 1.16.1-SNAPSHOT ../aai-parent/pom.xml aai-auth diff --git a/aai-common-docker/aai-common-images/pom.xml b/aai-common-docker/aai-common-images/pom.xml index 0b2ce37b..fa146d3d 100644 --- a/aai-common-docker/aai-common-images/pom.xml +++ b/aai-common-docker/aai-common-images/pom.xml @@ -25,11 +25,11 @@ org.onap.aai.aai-common aai-common-docker - 1.16.0-SNAPSHOT + 1.16.1-SNAPSHOT aai-common-images - 1.16.0-SNAPSHOT + 1.16.1-SNAPSHOT pom aai-aai-common-images Contains dockerfiles for aai-common images (alpine and ubuntu based). diff --git a/aai-common-docker/aai-haproxy-image/pom.xml b/aai-common-docker/aai-haproxy-image/pom.xml index cbbccc01..8aa59d23 100644 --- a/aai-common-docker/aai-haproxy-image/pom.xml +++ b/aai-common-docker/aai-haproxy-image/pom.xml @@ -25,11 +25,11 @@ org.onap.aai.aai-common aai-common-docker - 1.16.0-SNAPSHOT + 1.16.1-SNAPSHOT aai-haproxy-image - 1.16.0-SNAPSHOT + 1.16.1-SNAPSHOT pom aai-aai-haproxy-image Contains dockerfiles for aai-haproxy image. diff --git a/aai-common-docker/pom.xml b/aai-common-docker/pom.xml index ff78a999..706e1f7e 100644 --- a/aai-common-docker/pom.xml +++ b/aai-common-docker/pom.xml @@ -26,7 +26,7 @@ org.onap.aai.aai-common aai-parent - 1.16.0-SNAPSHOT + 1.16.1-SNAPSHOT ../aai-parent/pom.xml diff --git a/aai-core/pom.xml b/aai-core/pom.xml index 2a34d1ec..c6d862a3 100644 --- a/aai-core/pom.xml +++ b/aai-core/pom.xml @@ -26,7 +26,7 @@ limitations under the License. org.onap.aai.aai-common aai-parent - 1.16.0-SNAPSHOT + 1.16.1-SNAPSHOT ../aai-parent/pom.xml aai-core @@ -145,6 +145,7 @@ limitations under the License. org.hamcrest hamcrest-junit + 2.0.0.0 test diff --git a/aai-els-onap-logging/pom.xml b/aai-els-onap-logging/pom.xml index b2c80166..0fc47ebe 100644 --- a/aai-els-onap-logging/pom.xml +++ b/aai-els-onap-logging/pom.xml @@ -4,7 +4,7 @@ org.onap.aai.aai-common aai-parent - 1.16.0-SNAPSHOT + 1.16.1-SNAPSHOT ../aai-parent/pom.xml aai-els-onap-logging @@ -47,10 +47,6 @@ org.springframework spring-webmvc - - org.aspectj - aspectjrt - ch.qos.logback logback-core @@ -108,7 +104,7 @@ org.projectlombok lombok - 1.18.36 + 1.18.38 provided @@ -134,25 +130,8 @@ org.mockito mockito-core - 3.12.4 - test - - - junit - junit + 5.18.0 test - - - org.junit.vintage - junit-vintage-engine - test - - - org.hamcrest - hamcrest-core - - - diff --git a/aai-els-onap-logging/src/test/java/org/onap/aai/aailog/filter/RestControllerClientLoggingInterceptorTest.java b/aai-els-onap-logging/src/test/java/org/onap/aai/aailog/filter/RestControllerClientLoggingInterceptorTest.java index d0b7b372..d1d9ca61 100644 --- a/aai-els-onap-logging/src/test/java/org/onap/aai/aailog/filter/RestControllerClientLoggingInterceptorTest.java +++ b/aai-els-onap-logging/src/test/java/org/onap/aai/aailog/filter/RestControllerClientLoggingInterceptorTest.java @@ -20,8 +20,8 @@ package org.onap.aai.aailog.filter; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.mockito.Mockito.when; import java.net.InetAddress; @@ -29,13 +29,15 @@ import java.net.URI; import java.net.URISyntaxException; import java.net.UnknownHostException; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InjectMocks; import org.mockito.Spy; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; +import org.mockito.junit.jupiter.MockitoSettings; +import org.mockito.quality.Strictness; import org.onap.logging.filter.base.Constants; import org.onap.logging.ref.slf4j.ONAPLogConstants; import org.slf4j.MDC; @@ -44,7 +46,8 @@ import jakarta.ws.rs.client.ClientRequestContext; import jakarta.ws.rs.core.MultivaluedHashMap; import jakarta.ws.rs.core.MultivaluedMap; -@RunWith(MockitoJUnitRunner.class) +@MockitoSettings(strictness = Strictness.WARN) +@ExtendWith(MockitoExtension.class) public class RestControllerClientLoggingInterceptorTest { @Spy @@ -54,7 +57,7 @@ public class RestControllerClientLoggingInterceptorTest { @InjectMocks private RestControllerClientRequestLoggingInterceptor restControllerClientLoggingInterceptor; - @Before + @BeforeEach public void init() throws URISyntaxException { System.setProperty("jakarta.ws.rs.ext.RuntimeDelegate", "com.sun.ws.rs.ext.RuntimeDelegateImpl"); when(clientRequest.getHeaders()).thenReturn(new MultivaluedHashMap()); @@ -67,7 +70,7 @@ public class RestControllerClientLoggingInterceptorTest { // "GET"); } - @After + @AfterEach public void tearDown() { MDC.clear(); } diff --git a/aai-els-onap-logging/src/test/java/org/onap/logging/ref/slf4j/ONAPLogConstantsTest.java b/aai-els-onap-logging/src/test/java/org/onap/logging/ref/slf4j/ONAPLogConstantsTest.java index dee07a4a..49d3c134 100644 --- a/aai-els-onap-logging/src/test/java/org/onap/logging/ref/slf4j/ONAPLogConstantsTest.java +++ b/aai-els-onap-logging/src/test/java/org/onap/logging/ref/slf4j/ONAPLogConstantsTest.java @@ -24,22 +24,18 @@ package org.onap.logging.ref.slf4j; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.core.Is.is; import static org.hamcrest.core.IsInstanceOf.instanceOf; +import static org.junit.jupiter.api.Assertions.assertThrows; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.ExpectedException; +import org.junit.jupiter.api.Test; /** * Tests for {@link ONAPLogConstants}. */ public class ONAPLogConstantsTest { - @Rule - public ExpectedException exceptionRule = ExpectedException.none(); - @Test public void testConstructors() throws Exception { assertInaccessibleConstructor(ONAPLogConstants.class); @@ -49,12 +45,13 @@ public class ONAPLogConstantsTest { } @Test - public void testConstructorUnsupported() throws Exception { - exceptionRule.expect(InvocationTargetException.class); - exceptionRule.expectCause(instanceOf(UnsupportedOperationException.class)); - Constructor c = ONAPLogConstants.class.getDeclaredConstructors()[0]; - c.setAccessible(true); - c.newInstance(); + public void testConstructorUnsupported() { + Throwable exception = assertThrows(InvocationTargetException.class, () -> { + Constructor c = ONAPLogConstants.class.getDeclaredConstructors()[0]; + c.setAccessible(true); + c.newInstance(); + }); + assertThat(exception.getCause(), instanceOf(UnsupportedOperationException.class)); } @Test @@ -110,16 +107,12 @@ public class ONAPLogConstantsTest { } - void assertInaccessibleConstructor(final Class c) throws Exception { - exceptionRule.expect(IllegalAccessException.class); - // Should fail for hidden constructor. - c.getDeclaredConstructors()[0].newInstance(); - - - exceptionRule.expect(InvocationTargetException.class); - exceptionRule.expectCause(instanceOf(UnsupportedOperationException.class)); - final Constructor constructor = c.getDeclaredConstructors()[0]; - constructor.setAccessible(true); - constructor.newInstance(); + void assertInaccessibleConstructor(final Class c) { + Throwable exception = assertThrows(InvocationTargetException.class, () -> { + final Constructor constructor = c.getDeclaredConstructors()[0]; + constructor.setAccessible(true); + constructor.newInstance(); + }); + assertThat(exception.getCause(), instanceOf(UnsupportedOperationException.class)); } } diff --git a/aai-failover/pom.xml b/aai-failover/pom.xml index 9c84a538..629b0dbf 100644 --- a/aai-failover/pom.xml +++ b/aai-failover/pom.xml @@ -5,7 +5,7 @@ org.onap.aai.aai-common aai-parent - 1.16.0-SNAPSHOT + 1.16.1-SNAPSHOT ../aai-parent/pom.xml 4.0.0 diff --git a/aai-parent/pom.xml b/aai-parent/pom.xml index f6e7bd41..71dfbba0 100644 --- a/aai-parent/pom.xml +++ b/aai-parent/pom.xml @@ -27,7 +27,7 @@ limitations under the License. org.onap.aai.aai-common aai-common - 1.16.0-SNAPSHOT + 1.16.1-SNAPSHOT aai-parent aai-parent @@ -53,12 +53,11 @@ limitations under the License. 3.8.0 1.13.0 0.40.2 - 3.0.1 + 4.0.6 33.4.0-jre 3.7.3 1.1.0 2.9.1 - 2.0.0.0 2.2 2.3.1 2.1.1 @@ -79,7 +78,7 @@ limitations under the License. Please don't upgrade to 2.3.0 or above for nexus iq or security scans as it could potentially break our code --> - 3.0.13 + 3.1.12 2.2.0 20240303 4.12 @@ -90,7 +89,7 @@ limitations under the License. 3.1 3.1.1 0.9.10 - 1.18.36 + 1.18.38 1.20.4 3.1.0 @@ -103,7 +102,7 @@ limitations under the License. 0.00 - 0.8.12 + 0.8.13 3.2 jacoco ${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml @@ -211,23 +210,12 @@ limitations under the License. ${slf4j.version} - - org.hamcrest - java-hamcrest - ${hamcrest.junit.version} - - org.hamcrest hamcrest-core ${hamcrest.core.version} - - org.hamcrest - hamcrest-junit - ${hamcrest.junit.version} - jakarta.annotation jakarta.annotation-api @@ -344,7 +332,7 @@ limitations under the License. jakarta.xml.bind jakarta.xml.bind-api - 3.0.1 + 4.0.2 org.glassfish.jaxb diff --git a/aai-rest/pom.xml b/aai-rest/pom.xml index b865b1cc..275155ac 100644 --- a/aai-rest/pom.xml +++ b/aai-rest/pom.xml @@ -29,7 +29,7 @@ org.onap.aai.aai-common aai-parent - 1.16.0-SNAPSHOT + 1.16.1-SNAPSHOT ../aai-parent/pom.xml aai-rest diff --git a/aai-schema-abstraction/pom.xml b/aai-schema-abstraction/pom.xml index 3722b283..17536070 100644 --- a/aai-schema-abstraction/pom.xml +++ b/aai-schema-abstraction/pom.xml @@ -28,7 +28,7 @@ org.onap.aai.aai-common aai-parent - 1.16.0-SNAPSHOT + 1.16.1-SNAPSHOT ../aai-parent/pom.xml @@ -79,7 +79,7 @@ org.mockito mockito-junit-jupiter - 5.14.2 + 5.18.0 test diff --git a/aai-schema-ingest/pom.xml b/aai-schema-ingest/pom.xml index 20a8441d..1c5252fe 100644 --- a/aai-schema-ingest/pom.xml +++ b/aai-schema-ingest/pom.xml @@ -26,7 +26,7 @@ limitations under the License. org.onap.aai.aai-common aai-parent - 1.16.0-SNAPSHOT + 1.16.1-SNAPSHOT ../aai-parent/pom.xml aai-schema-ingest @@ -131,22 +131,23 @@ limitations under the License. spring-boot-test test - - org.hamcrest - hamcrest-junit - test - - - junit - junit - - - - - org.junit.jupiter - junit-jupiter - test - + + org.hamcrest + hamcrest-junit + 2.0.0.0 + test + + + junit + junit + + + + + org.junit.jupiter + junit-jupiter + test + org.mockito mockito-core diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/restclient/MockRestClient.java b/aai-schema-ingest/src/test/java/org/onap/aai/restclient/MockRestClient.java index 5d20b457..b643e735 100644 --- a/aai-schema-ingest/src/test/java/org/onap/aai/restclient/MockRestClient.java +++ b/aai-schema-ingest/src/test/java/org/onap/aai/restclient/MockRestClient.java @@ -123,7 +123,7 @@ public class MockRestClient extends RestClient { InputStream inputStream = getClass().getClassLoader().getResourceAsStream(filename); String result = IOUtils.toString(inputStream, StandardCharsets.UTF_8); - String message = String.format("Unable to find the %s in src/test/resources", filename); + String message = "Unable to find the %s in src/test/resources".formatted(filename); assertNotNull(inputStream, message); JsonObject payload = JsonParser.parseString(result).getAsJsonObject(); diff --git a/aai-utils/pom.xml b/aai-utils/pom.xml index 0de7b7c0..23f51afe 100644 --- a/aai-utils/pom.xml +++ b/aai-utils/pom.xml @@ -27,7 +27,7 @@ org.onap.aai.aai-common aai-parent - 1.16.0-SNAPSHOT + 1.16.1-SNAPSHOT ../aai-parent/pom.xml aai-utils diff --git a/pom.xml b/pom.xml index 5ec4e775..2877f07c 100644 --- a/pom.xml +++ b/pom.xml @@ -30,7 +30,7 @@ org.onap.aai.aai-common aai-common - 1.16.0-SNAPSHOT + 1.16.1-SNAPSHOT pom aai-aai-common Contains all of the common code for resources and traversal repos diff --git a/version.properties b/version.properties index 85d1d0c1..02346c50 100644 --- a/version.properties +++ b/version.properties @@ -5,7 +5,7 @@ major_version=1 minor_version=16 -patch_version=0 +patch_version=1 base_version=${major_version}.${minor_version}.${patch_version}