summaryrefslogtreecommitdiffstats
path: root/feature-healthcheck
diff options
context:
space:
mode:
authoradheli.tavares <adheli.tavares@est.tech>2023-08-07 16:01:21 -0400
committeradheli.tavares <adheli.tavares@est.tech>2023-09-22 16:08:11 +0100
commit396f60280265a37379916ad12752a94691118f65 (patch)
tree4b6d54a1567482a89bc471577c6efe484f6dadd8 /feature-healthcheck
parentd6f6ebc925506cdf18b903df2cd3cbcef311082d (diff)
Upgrade java-17 in drools-pdp
Issue-ID: POLICY-4676 Change-Id: I85a0f6303b30cd0405d63be003c9288f59a9d6b7 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
Diffstat (limited to 'feature-healthcheck')
-rw-r--r--feature-healthcheck/pom.xml38
-rw-r--r--feature-healthcheck/src/main/java/org/onap/policy/drools/healthcheck/HealthCheckManager.java2
-rw-r--r--feature-healthcheck/src/main/java/org/onap/policy/drools/healthcheck/RestHealthCheck.java12
-rw-r--r--feature-healthcheck/src/test/java/org/onap/policy/drools/healthcheck/HealthCheckManagerTest.java2
-rw-r--r--feature-healthcheck/src/test/java/org/onap/policy/drools/healthcheck/RestHealthCheckTest.java2
-rw-r--r--feature-healthcheck/src/test/java/org/onap/policy/drools/healthcheck/RestMockHealthCheck.java12
-rw-r--r--feature-healthcheck/src/test/java/org/onap/policy/drools/healthcheck/TestAafHealthCheckFilter.java2
7 files changed, 22 insertions, 48 deletions
diff --git a/feature-healthcheck/pom.xml b/feature-healthcheck/pom.xml
index 6b24443b..57093298 100644
--- a/feature-healthcheck/pom.xml
+++ b/feature-healthcheck/pom.xml
@@ -19,14 +19,15 @@
============LICENSE_END=========================================================
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.onap.policy.drools-pdp</groupId>
<artifactId>drools-pdp</artifactId>
- <version>2.0.0-SNAPSHOT</version>
+ <version>2.0.1-SNAPSHOT</version>
</parent>
<artifactId>feature-healthcheck</artifactId>
@@ -98,19 +99,19 @@
<language>jaxrs-spec</language>
<generateModels>false</generateModels>
<generateSupportingFiles>false</generateSupportingFiles>
- <sortParamsByRequiredFlag>false</sortParamsByRequiredFlag>
<importMappings>
- Response=javax.ws.rs.core.Response
+ Response=jakarta.ws.rs.core.Response
</importMappings>
<typeMappings>
<typeMapping>boolean=boolean</typeMapping>
</typeMappings>
<configOptions>
<sourceFolder>src/gen/java</sourceFolder>
- <dateLibrary>java11</dateLibrary>
+ <dateLibrary>java17</dateLibrary>
<interfaceOnly>true</interfaceOnly>
<useTags>true</useTags>
<skipIfSpecIsUnchanged>false</skipIfSpecIsUnchanged>
+ <jakarta>true</jakarta>
</configOptions>
</configuration>
</execution>
@@ -127,38 +128,11 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.onap.policy.common</groupId>
- <artifactId>policy-endpoints</artifactId>
- <version>${policy.common.version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
<groupId>org.onap.policy.drools-pdp</groupId>
<artifactId>policy-management</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.awaitility</groupId>
- <artifactId>awaitility</artifactId>
- <scope>test</scope>
- </dependency>
- <!-- Swagger v3 annotations -->
- <dependency>
- <groupId>io.swagger.core.v3</groupId>
- <artifactId>swagger-annotations</artifactId>
- <version>${version.swagger.core.v3}</version>
- </dependency>
</dependencies>
</project>
diff --git a/feature-healthcheck/src/main/java/org/onap/policy/drools/healthcheck/HealthCheckManager.java b/feature-healthcheck/src/main/java/org/onap/policy/drools/healthcheck/HealthCheckManager.java
index daedcc20..0e81c206 100644
--- a/feature-healthcheck/src/main/java/org/onap/policy/drools/healthcheck/HealthCheckManager.java
+++ b/feature-healthcheck/src/main/java/org/onap/policy/drools/healthcheck/HealthCheckManager.java
@@ -21,6 +21,7 @@
package org.onap.policy.drools.healthcheck;
import com.google.common.base.Strings;
+import jakarta.ws.rs.core.Response;
import java.lang.management.ManagementFactory;
import java.util.ArrayList;
import java.util.Arrays;
@@ -33,7 +34,6 @@ import java.util.function.Function;
import java.util.function.Supplier;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
-import javax.ws.rs.core.Response;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.NonNull;
diff --git a/feature-healthcheck/src/main/java/org/onap/policy/drools/healthcheck/RestHealthCheck.java b/feature-healthcheck/src/main/java/org/onap/policy/drools/healthcheck/RestHealthCheck.java
index 64cea621..a2fb4ced 100644
--- a/feature-healthcheck/src/main/java/org/onap/policy/drools/healthcheck/RestHealthCheck.java
+++ b/feature-healthcheck/src/main/java/org/onap/policy/drools/healthcheck/RestHealthCheck.java
@@ -21,12 +21,12 @@
package org.onap.policy.drools.healthcheck;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.PathParam;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.core.MediaType;
+import jakarta.ws.rs.core.Response;
import org.onap.policy.common.endpoints.http.client.HttpClientFactory;
import org.onap.policy.common.endpoints.http.client.HttpClientFactoryInstance;
import org.onap.policy.common.endpoints.http.server.YamlMessageBodyHandler;
diff --git a/feature-healthcheck/src/test/java/org/onap/policy/drools/healthcheck/HealthCheckManagerTest.java b/feature-healthcheck/src/test/java/org/onap/policy/drools/healthcheck/HealthCheckManagerTest.java
index 20cfa9e0..9e081015 100644
--- a/feature-healthcheck/src/test/java/org/onap/policy/drools/healthcheck/HealthCheckManagerTest.java
+++ b/feature-healthcheck/src/test/java/org/onap/policy/drools/healthcheck/HealthCheckManagerTest.java
@@ -32,6 +32,7 @@ import static org.mockito.Mockito.never;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
+import jakarta.ws.rs.core.Response;
import java.net.HttpURLConnection;
import java.util.ArrayList;
import java.util.Arrays;
@@ -39,7 +40,6 @@ import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.stream.Collectors;
-import javax.ws.rs.core.Response;
import org.eclipse.jetty.http.HttpStatus;
import org.junit.Before;
import org.junit.Test;
diff --git a/feature-healthcheck/src/test/java/org/onap/policy/drools/healthcheck/RestHealthCheckTest.java b/feature-healthcheck/src/test/java/org/onap/policy/drools/healthcheck/RestHealthCheckTest.java
index 2af39a80..13ad5211 100644
--- a/feature-healthcheck/src/test/java/org/onap/policy/drools/healthcheck/RestHealthCheckTest.java
+++ b/feature-healthcheck/src/test/java/org/onap/policy/drools/healthcheck/RestHealthCheckTest.java
@@ -25,7 +25,7 @@ import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
-import javax.ws.rs.core.Response;
+import jakarta.ws.rs.core.Response;
import org.junit.BeforeClass;
import org.junit.Test;
import org.onap.policy.common.endpoints.event.comm.bus.internal.BusTopicParams;
diff --git a/feature-healthcheck/src/test/java/org/onap/policy/drools/healthcheck/RestMockHealthCheck.java b/feature-healthcheck/src/test/java/org/onap/policy/drools/healthcheck/RestMockHealthCheck.java
index 910974ef..d2376d9d 100644
--- a/feature-healthcheck/src/test/java/org/onap/policy/drools/healthcheck/RestMockHealthCheck.java
+++ b/feature-healthcheck/src/test/java/org/onap/policy/drools/healthcheck/RestMockHealthCheck.java
@@ -22,13 +22,13 @@ package org.onap.policy.drools.healthcheck;
import static org.awaitility.Awaitility.await;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.core.MediaType;
+import jakarta.ws.rs.core.Response;
+import jakarta.ws.rs.core.Response.Status;
import java.util.concurrent.TimeUnit;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.Response.Status;
import org.onap.policy.common.endpoints.http.server.YamlMessageBodyHandler;
@Path("/")
diff --git a/feature-healthcheck/src/test/java/org/onap/policy/drools/healthcheck/TestAafHealthCheckFilter.java b/feature-healthcheck/src/test/java/org/onap/policy/drools/healthcheck/TestAafHealthCheckFilter.java
index 9c34670c..3abcd32e 100644
--- a/feature-healthcheck/src/test/java/org/onap/policy/drools/healthcheck/TestAafHealthCheckFilter.java
+++ b/feature-healthcheck/src/test/java/org/onap/policy/drools/healthcheck/TestAafHealthCheckFilter.java
@@ -20,7 +20,7 @@
package org.onap.policy.drools.healthcheck;
-import javax.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletRequest;
import org.onap.policy.common.utils.network.NetworkUtil;
/**