diff options
author | 2019-04-05 08:59:41 +0800 | |
---|---|---|
committer | 2019-04-05 08:59:41 +0800 | |
commit | 999748a64e72b9a7975ddac3406eb95a0b9aeaff (patch) | |
tree | b0691008cb8e05836dc99247191e5894e2a4db89 /artifactbroker/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception | |
parent | de2f1e42e37b975454af53aeb81a2ae2e7627e99 (diff) |
add subplug for k8s to invoke Artifact forward support
. add forward plugin to forward Artifact
. add test case to cover basic httpPost action
. fix the misuse of List and ArrayList to avoid Null Pointer
Change-Id: I18ead2ba6251a93fddff4657f3945d635a450276
Issue-ID: MULTICLOUD-514
Signed-off-by: liboNet <libo.zhu@intel.com>
Diffstat (limited to 'artifactbroker/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception')
-rw-r--r-- | artifactbroker/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandler.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/artifactbroker/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandler.java b/artifactbroker/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandler.java index 998527b..6b8f3b6 100644 --- a/artifactbroker/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandler.java +++ b/artifactbroker/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandler.java @@ -27,8 +27,9 @@ import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; +import java.util.ArrayList; import java.util.List; -import java.util.Map; +import java.util.HashMap; import org.onap.policy.common.logging.flexlogger.FlexLogger; import org.onap.policy.common.logging.flexlogger.Logger; @@ -220,8 +221,8 @@ public class SdcReceptionHandler extends AbstractReceptionHandler implements INo DistributionStatisticsManager.updateTotalDistributionCount(); List<String> relevantArtifactTypes = sdcConfig.getRelevantArtifactTypes(); Path path = Paths.get("/data"); - List<VfModuleModel> vfModuleModels = null; - Map<String, IArtifactInfo> artifactMap = null;//key is UUID, value is artifact for shared folder + ArrayList<VfModuleModel> vfModuleModels = new ArrayList<>(); + HashMap<String, IArtifactInfo> artifactMap = new HashMap<>();//key is UUID, value is artifact for shared folder String vfArtifactData = null; for (final IArtifactInfo artifact : resource.getArtifacts()) { |