Security uplift 99/140699/1
authoradheli.tavares <adheli.tavares@est.tech>
Mon, 14 Apr 2025 15:37:46 +0000 (16:37 +0100)
committeradheli.tavares <adheli.tavares@est.tech>
Mon, 14 Apr 2025 15:38:53 +0000 (16:38 +0100)
- add a new openapi dependency after swagger openapi uplift
- fix error messages updated by new dependency versions
- uplift spring-cloud for participant k-serve

Issue-ID: POLICY-5302
Change-Id: I2d4cf20618aad0a4044a763c263f987fd4f6d075
Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
models/src/main/java/org/onap/policy/clamp/models/acm/persistence/concepts/JpaParticipant.java
participant/participant-impl/participant-impl-kserve/pom.xml
participant/pom.xml
runtime-acm/pom.xml
runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/commissioning/rest/CommissioningControllerTest.java
runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/contract/CommissioningControllerStubTest.java

index 5bc2fc4..58c95b7 100644 (file)
@@ -1,6 +1,6 @@
 /*-
  * ============LICENSE_START=======================================================
- * Copyright (C) 2021-2024 Nordix Foundation.
+ * Copyright (C) 2021-2025 OpenInfra Foundation Europe. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -31,6 +31,7 @@ import jakarta.persistence.InheritanceType;
 import jakarta.persistence.JoinColumn;
 import jakarta.persistence.OneToMany;
 import jakarta.persistence.Table;
+import java.io.Serial;
 import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.LinkedHashMap;
@@ -60,6 +61,8 @@ import org.onap.policy.models.base.Validated;
 @EqualsAndHashCode(callSuper = false)
 public class JpaParticipant extends Validated
         implements PfAuthorative<Participant>, Comparable<JpaParticipant>, Serializable {
+
+    @Serial
     private static final long serialVersionUID = -4697758484642403483L;
 
     @Id
index 499342f..0e15030 100644 (file)
@@ -1,6 +1,6 @@
 <!--
   ============LICENSE_START=======================================================
-  Copyright (C) 2023-2025 Nordix Foundation.
+  Copyright (C) 2023-2025 OpenInfra Foundation Europe. All rights reserved.
   ================================================================================
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
@@ -52,7 +52,7 @@
             <dependency>
                 <groupId>org.springframework.cloud</groupId>
                 <artifactId>spring-cloud-dependencies</artifactId>
-                <version>2024.0.0</version>
+                <version>2024.0.1</version>
                 <type>pom</type>
                 <scope>import</scope>
             </dependency>
index c26dfd0..2363ff3 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
   ============LICENSE_START=======================================================
-  Copyright (C) 2021, 2023-2025 Nordix Foundation.
+  Copyright (C) 2021, 2023-2025 OpenInfra Foundation Europe. All rights reserved.
   ================================================================================
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
             <groupId>io.micrometer</groupId>
             <artifactId>micrometer-tracing-bridge-otel</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.openapitools</groupId>
+            <artifactId>jackson-databind-nullable</artifactId>
+        </dependency>
     </dependencies>
 
     <build>
index a44b767..f934d9a 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
   ============LICENSE_START=======================================================
-  Copyright (C) 2021-2025 Nordix Foundation.
+  Copyright (C) 2021-2025 OpenInfra Foundation Europe. All rights reserved.
   ================================================================================
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
             <groupId>org.aspectj</groupId>
             <artifactId>aspectjweaver</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.openapitools</groupId>
+            <artifactId>jackson-databind-nullable</artifactId>
+        </dependency>
         <dependency>
             <groupId>jakarta.servlet</groupId>
             <artifactId>jakarta.servlet-api</artifactId>
index 16de37e..069708f 100644 (file)
@@ -1,6 +1,6 @@
 /*-
  * ============LICENSE_START=======================================================
- *  Copyright (C) 2021-2024 Nordix Foundation.
+ *  Copyright (C) 2021-2025 OpenInfra Foundation Europe. All rights reserved.
  *  Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -81,12 +81,12 @@ class CommissioningControllerTest extends CommonRestController {
      * starts Main and inserts a commissioning template.
      */
     @BeforeAll
-    public static void setUpBeforeClass() {
+    static void setUpBeforeClass() {
         serviceTemplate = InstantiationUtils.getToscaServiceTemplate(TOSCA_SERVICE_TEMPLATE_YAML);
     }
 
     @BeforeEach
-    public void setUpPort() {
+    void setUpPort() {
         super.setHttpPrefix(randomServerPort);
     }
 
@@ -123,9 +123,7 @@ class CommissioningControllerTest extends CommonRestController {
         assertThat(Response.Status.BAD_REQUEST.getStatusCode()).isEqualTo(resp.getStatus());
         var commissioningResponse = resp.readEntity(CommissioningResponse.class);
         assertThat(commissioningResponse.getErrorDetails())
-            .isEqualTo("org.springframework.http.converter.HttpMessageNotReadableException "
-                + "Could not read JSON: java.lang.IllegalStateException: "
-                + "Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $");
+            .contains("org.springframework.http.converter.HttpMessageNotReadableException");
         assertThat(commissioningResponse.getAffectedAutomationCompositionDefinitions()).isNull();
         resp.close();
     }
index 3172d4f..7a159d9 100644 (file)
@@ -1,6 +1,6 @@
 /*-
  * ============LICENSE_START=======================================================
- *  Copyright (C) 2022-2023 Nordix Foundation.
+ * Copyright (C) 2022-2023, 2025 OpenInfra Foundation Europe. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -42,13 +42,13 @@ class CommissioningControllerStubTest extends CommonRestController {
 
     private static final String COMMISSIONING_ENDPOINT = "compositions";
     private static final String COMPOSITION_ID = "1aeed185-a98b-45b6-af22-8d5d20485ea3";
-    private static ToscaServiceTemplate serviceTemplate = new ToscaServiceTemplate();
+    private static final ToscaServiceTemplate serviceTemplate = new ToscaServiceTemplate();
 
     @LocalServerPort
     private int randomServerPort;
 
     @BeforeEach
-    public void setUpPort() {
+    void setUpPort() {
         super.setHttpPrefix(randomServerPort);
     }
 
@@ -71,6 +71,7 @@ class CommissioningControllerStubTest extends CommonRestController {
         var invocationBuilder = super.sendRequest(COMMISSIONING_ENDPOINT + "/" + COMPOSITION_ID);
         var respPost = invocationBuilder.put(Entity.json(serviceTemplate));
         assertThat(Response.Status.ACCEPTED.getStatusCode()).isEqualTo(respPost.getStatus());
+        respPost.close();
     }
 
     @Test
@@ -78,6 +79,7 @@ class CommissioningControllerStubTest extends CommonRestController {
         var invocationBuilder = super.sendRequest(COMMISSIONING_ENDPOINT);
         var respPost = invocationBuilder.post(Entity.json(serviceTemplate));
         assertThat(Response.Status.OK.getStatusCode()).isEqualTo(respPost.getStatus());
+        respPost.close();
     }
 
     @Test
@@ -85,5 +87,6 @@ class CommissioningControllerStubTest extends CommonRestController {
         var invocationBuilder = super.sendRequest(COMMISSIONING_ENDPOINT + "/" + COMPOSITION_ID);
         var respPost = invocationBuilder.delete();
         assertThat(Response.Status.OK.getStatusCode()).isEqualTo(respPost.getStatus());
+        respPost.close();
     }
 }