summaryrefslogtreecommitdiffstats
path: root/a1-policy-management
diff options
context:
space:
mode:
Diffstat (limited to 'a1-policy-management')
-rw-r--r--a1-policy-management/pom.xml12
-rw-r--r--a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/configuration/ApplicationConfig.java4
-rw-r--r--a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/configuration/ApplicationConfigParser.java4
-rw-r--r--a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/configuration/ConfigurationFile.java6
-rw-r--r--a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/configuration/Meters.java2
-rw-r--r--a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ApplicationTest.java3
-rw-r--r--a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/tasks/RicSynchronizationTaskTest.java4
7 files changed, 10 insertions, 25 deletions
diff --git a/a1-policy-management/pom.xml b/a1-policy-management/pom.xml
index e03c5268..eedc5143 100644
--- a/a1-policy-management/pom.xml
+++ b/a1-policy-management/pom.xml
@@ -35,8 +35,8 @@
<java.version.source>11</java.version.source>
<java.version.target>11</java.version.target>
<springfox.version>3.0.0</springfox.version>
- <gson.version>2.9.0</gson.version>
- <json.version>20220320</json.version>
+ <gson.version>2.10.1</gson.version>
+ <json.version>20220924</json.version>
<formatter-maven-plugin.version>2.13.0</formatter-maven-plugin.version>
<spotless-maven-plugin.version>2.5.0</spotless-maven-plugin.version>
<commons-io.version>2.11.0</commons-io.version>
@@ -47,7 +47,7 @@
<swagger-codegen-maven-plugin.version>3.0.11</swagger-codegen-maven-plugin.version>
<exec.skip>true</exec.skip>
<ccsdk.project.version>${project.version}</ccsdk.project.version>
- <software.amazon.awssdk.version>2.17.292</software.amazon.awssdk.version>
+ <software.amazon.awssdk.version>2.19.17</software.amazon.awssdk.version>
</properties>
<dependencies>
<dependency>
@@ -106,10 +106,6 @@
<artifactId>tomcat-embed-core</artifactId>
</dependency>
<dependency>
- <groupId>javax.validation</groupId>
- <artifactId>validation-api</artifactId>
- </dependency>
- <dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava.version}</version>
@@ -435,4 +431,4 @@
</plugin>
</plugins>
</build>
-</project>
+</project> \ No newline at end of file
diff --git a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/configuration/ApplicationConfig.java b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/configuration/ApplicationConfig.java
index 6dbf318d..796d6ad9 100644
--- a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/configuration/ApplicationConfig.java
+++ b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/configuration/ApplicationConfig.java
@@ -27,8 +27,6 @@ import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
-import javax.validation.constraints.NotEmpty;
-
import lombok.Getter;
import org.onap.ccsdk.oran.a1policymanagementservice.configuration.WebClientConfig.HttpProxyConfig;
@@ -41,7 +39,7 @@ import reactor.netty.transport.ProxyProvider;
@EnableConfigurationProperties
public class ApplicationConfig {
- @NotEmpty
+
@Getter
@Value("${app.filepath}")
private String localConfigurationFilePath;
diff --git a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/configuration/ApplicationConfigParser.java b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/configuration/ApplicationConfigParser.java
index 3990bc7b..6c178d36 100644
--- a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/configuration/ApplicationConfigParser.java
+++ b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/configuration/ApplicationConfigParser.java
@@ -39,8 +39,6 @@ import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
-import javax.validation.constraints.NotNull;
-
import lombok.Builder;
import lombok.Getter;
@@ -249,7 +247,7 @@ public class ApplicationConfigParser {
return getAsString(dmaapInfo, "topic_url");
}
- private static @NotNull String getAsString(JsonObject obj, String memberName) throws ServiceException {
+ private static String getAsString(JsonObject obj, String memberName) throws ServiceException {
return get(obj, memberName).getAsString();
}
}
diff --git a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/configuration/ConfigurationFile.java b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/configuration/ConfigurationFile.java
index 9db66202..efe2fa2e 100644
--- a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/configuration/ConfigurationFile.java
+++ b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/configuration/ConfigurationFile.java
@@ -33,11 +33,8 @@ import java.io.InputStreamReader;
import java.lang.invoke.MethodHandles;
import java.util.Optional;
-import javax.validation.constraints.NotNull;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
@@ -47,7 +44,6 @@ public class ConfigurationFile {
final ApplicationConfig appConfig;
final Gson gson = new Gson();
- @Autowired
public ConfigurationFile(ApplicationConfig appConfig) {
this.appConfig = appConfig;
}
@@ -93,7 +89,7 @@ public class ConfigurationFile {
return JsonParser.parseReader(new InputStreamReader(inputStream));
}
- private InputStream createInputStream(@NotNull String filepath) throws IOException {
+ private InputStream createInputStream(String filepath) throws IOException {
return new BufferedInputStream(new FileInputStream(filepath));
}
}
diff --git a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/configuration/Meters.java b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/configuration/Meters.java
index 203bfacc..c53b1ee9 100644
--- a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/configuration/Meters.java
+++ b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/configuration/Meters.java
@@ -25,7 +25,6 @@ import io.micrometer.core.instrument.MeterRegistry;
import org.onap.ccsdk.oran.a1policymanagementservice.repository.Policies;
import org.onap.ccsdk.oran.a1policymanagementservice.repository.PolicyTypes;
import org.onap.ccsdk.oran.a1policymanagementservice.repository.Rics;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
@@ -36,7 +35,6 @@ import org.springframework.stereotype.Component;
@Component
public class Meters {
- @Autowired
public Meters(Rics rics, PolicyTypes policyTypes, Policies policies, MeterRegistry meterRegistry) {
meterRegistry.gauge("total_ric_count", rics, Rics::size);
meterRegistry.gauge("total_policy_type_count", policyTypes, PolicyTypes::size);
diff --git a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ApplicationTest.java b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ApplicationTest.java
index 1e8278a9..ec65e4c1 100644
--- a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ApplicationTest.java
+++ b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ApplicationTest.java
@@ -31,7 +31,6 @@ import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import java.io.FileOutputStream;
-import java.io.IOException;
import java.io.PrintStream;
import java.lang.invoke.MethodHandles;
import java.nio.charset.StandardCharsets;
@@ -233,7 +232,7 @@ class ApplicationTest {
}
@Test
- void generateApiDoc() throws IOException {
+ void generateApiDoc() throws Exception {
String url = "https://localhost:" + this.port + "/v3/api-docs";
ResponseEntity<String> resp = restClient("", false).getForEntity(url).block();
assertThat(resp.getStatusCode()).isEqualTo(HttpStatus.OK);
diff --git a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/tasks/RicSynchronizationTaskTest.java b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/tasks/RicSynchronizationTaskTest.java
index ae4e92bc..b17cc98b 100644
--- a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/tasks/RicSynchronizationTaskTest.java
+++ b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/tasks/RicSynchronizationTaskTest.java
@@ -149,8 +149,8 @@ class RicSynchronizationTaskTest {
setUpCreationOfA1Client();
simulateRicWithNoPolicyTypes();
policies.put(policy1);
- WebClientRequestException exception =
- new WebClientRequestException(new ServiceException("x"), null, null, null);
+ WebClientRequestException exception = new WebClientRequestException(new ServiceException("x"), null, null,
+ new org.springframework.http.HttpHeaders());
when(a1ClientMock.deleteAllPolicies(anySet())).thenReturn(Flux.error(exception));
ric1.setState(RicState.AVAILABLE);
runSynch(ric1);