aboutsummaryrefslogtreecommitdiffstats
path: root/participant/participant-impl/participant-impl-kubernetes/src
diff options
context:
space:
mode:
authorTaka Cho <takamune.cho@att.com>2021-08-17 14:23:26 -0400
committerTaka Cho <takamune.cho@att.com>2021-08-20 17:16:49 -0400
commitbf06e83f40cdbfcfc1428040bf8fa58a518cdea4 (patch)
tree6bf66e14c5e340f4faa8e08cf7404e40cc6e4096 /participant/participant-impl/participant-impl-kubernetes/src
parent172f990bd92e1441eca6dd161458efddb674b2fc (diff)
sonar fix for clamp
- bug: added InterruptedException for sleep - vulns: two false positve - removed some unused import - changed to use var for local variable Issue-ID: POLICY-3452 Change-Id: I8b4be1378a2aad8f68562b63f70853832673ce97 Signed-off-by: Taka Cho <takamune.cho@att.com>
Diffstat (limited to 'participant/participant-impl/participant-impl-kubernetes/src')
-rw-r--r--participant/participant-impl/participant-impl-kubernetes/src/main/java/org/onap/policy/clamp/controlloop/participant/kubernetes/configurations/ParticipantConfig.java6
-rw-r--r--participant/participant-impl/participant-impl-kubernetes/src/main/java/org/onap/policy/clamp/controlloop/participant/kubernetes/helm/HelmClient.java3
-rw-r--r--participant/participant-impl/participant-impl-kubernetes/src/main/java/org/onap/policy/clamp/controlloop/participant/kubernetes/service/ChartStore.java8
3 files changed, 9 insertions, 8 deletions
diff --git a/participant/participant-impl/participant-impl-kubernetes/src/main/java/org/onap/policy/clamp/controlloop/participant/kubernetes/configurations/ParticipantConfig.java b/participant/participant-impl/participant-impl-kubernetes/src/main/java/org/onap/policy/clamp/controlloop/participant/kubernetes/configurations/ParticipantConfig.java
index 97adfde88..54627d557 100644
--- a/participant/participant-impl/participant-impl-kubernetes/src/main/java/org/onap/policy/clamp/controlloop/participant/kubernetes/configurations/ParticipantConfig.java
+++ b/participant/participant-impl/participant-impl-kubernetes/src/main/java/org/onap/policy/clamp/controlloop/participant/kubernetes/configurations/ParticipantConfig.java
@@ -2,6 +2,8 @@
* ========================LICENSE_START=================================
* Copyright (C) 2021 Nordix Foundation. All rights reserved.
* ======================================================================
+ * Modifications Copyright (C) 2021 AT&T Intellectual Property. 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.
* You may obtain a copy of the License at
@@ -18,10 +20,6 @@
package org.onap.policy.clamp.controlloop.participant.kubernetes.configurations;
-import org.apache.catalina.connector.Connector;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
-import org.springframework.boot.web.servlet.server.ServletWebServerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.multipart.MultipartResolver;
diff --git a/participant/participant-impl/participant-impl-kubernetes/src/main/java/org/onap/policy/clamp/controlloop/participant/kubernetes/helm/HelmClient.java b/participant/participant-impl/participant-impl-kubernetes/src/main/java/org/onap/policy/clamp/controlloop/participant/kubernetes/helm/HelmClient.java
index b38fbeb81..6a1b98654 100644
--- a/participant/participant-impl/participant-impl-kubernetes/src/main/java/org/onap/policy/clamp/controlloop/participant/kubernetes/helm/HelmClient.java
+++ b/participant/participant-impl/participant-impl-kubernetes/src/main/java/org/onap/policy/clamp/controlloop/participant/kubernetes/helm/HelmClient.java
@@ -2,6 +2,8 @@
* ========================LICENSE_START=================================
* Copyright (C) 2021 Nordix Foundation. All rights reserved.
* ======================================================================
+ * Modifications Copyright (C) 2021 AT&T Intellectual Property. 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.
* You may obtain a copy of the License at
@@ -25,7 +27,6 @@ import java.io.InputStreamReader;
import java.lang.invoke.MethodHandles;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.List;
import java.util.Map;
import org.apache.commons.io.IOUtils;
diff --git a/participant/participant-impl/participant-impl-kubernetes/src/main/java/org/onap/policy/clamp/controlloop/participant/kubernetes/service/ChartStore.java b/participant/participant-impl/participant-impl-kubernetes/src/main/java/org/onap/policy/clamp/controlloop/participant/kubernetes/service/ChartStore.java
index 975671705..ed53d0352 100644
--- a/participant/participant-impl/participant-impl-kubernetes/src/main/java/org/onap/policy/clamp/controlloop/participant/kubernetes/service/ChartStore.java
+++ b/participant/participant-impl/participant-impl-kubernetes/src/main/java/org/onap/policy/clamp/controlloop/participant/kubernetes/service/ChartStore.java
@@ -2,6 +2,8 @@
* ========================LICENSE_START=================================
* Copyright (C) 2021 Nordix Foundation. All rights reserved.
* ======================================================================
+ * Modifications Copyright (C) 2021 AT&T Intellectual Property. 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.
* You may obtain a copy of the License at
@@ -168,7 +170,7 @@ public class ChartStore {
try (var out = new PrintStream(new FileOutputStream(getFile(chart)))) {
out.print(STANDARD_CODER.encode(chart));
} catch (Exception exc) {
- LOGGER.warn("Could not store chart: {} {}", chart.getChartId(), exc);
+ LOGGER.warn("Could not store chart: {}", chart.getChartId(), exc);
}
}
@@ -179,11 +181,11 @@ public class ChartStore {
private synchronized void restoreFromLocalFileSystem() {
try {
- Path localChartDirectoryPath = Paths.get(participantK8sParameters.getLocalChartDirectory());
+ var localChartDirectoryPath = Paths.get(participantK8sParameters.getLocalChartDirectory());
Files.createDirectories(localChartDirectoryPath);
restoreFromLocalFileSystem(localChartDirectoryPath);
} catch (Exception ioe) {
- LOGGER.warn("Could not restore charts from local file system: {}", ioe);
+ LOGGER.warn("Could not restore charts from local file system", ioe);
}
}