summaryrefslogtreecommitdiffstats
path: root/a1-policy-management/src/main
diff options
context:
space:
mode:
authorPatrikBuhr <patrik.buhr@est.tech>2023-01-16 15:27:10 +0100
committerPatrikBuhr <patrik.buhr@est.tech>2023-01-19 09:21:45 +0100
commitaee111025016696c6aa5ffe1f86acdb731a7ff0f (patch)
tree79abf2c001cbb46b499aab553aa9251f94bc86a9 /a1-policy-management/src/main
parentc0218ada67784a7d5c3a488303bcbab2b3dce5b5 (diff)
Changes needed for springboot version 2.7.7
Change-Id: Ie13ba28d3d9bf62a7851145ab84d3a1509d84261 Issue-ID: CCSDK-3841 Signed-off-by: PatrikBuhr <patrik.buhr@est.tech>
Diffstat (limited to 'a1-policy-management/src/main')
-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
4 files changed, 3 insertions, 13 deletions
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);