summaryrefslogtreecommitdiffstats
path: root/plugins/reception-plugins/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/reception-plugins/src/main')
-rw-r--r--plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/decoding/hpa/PolicyDecoderCsarHpa.java5
-rw-r--r--plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/decoding/policy/file/PolicyDecoderFileInCsarToPolicy.java8
-rw-r--r--plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandler.java5
3 files changed, 9 insertions, 9 deletions
diff --git a/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/decoding/hpa/PolicyDecoderCsarHpa.java b/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/decoding/hpa/PolicyDecoderCsarHpa.java
index e1e1a9a9..51aa15f6 100644
--- a/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/decoding/hpa/PolicyDecoderCsarHpa.java
+++ b/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/decoding/hpa/PolicyDecoderCsarHpa.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2020 AT&T Inc.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -46,6 +47,10 @@ import org.slf4j.LoggerFactory;
public class PolicyDecoderCsarHpa implements PolicyDecoder<Csar, ToscaServiceTemplate> {
private static final Logger LOGGER = LoggerFactory.getLogger(PolicyDecoderCsarHpa.class);
+ //
+ // This is initialized in configure() but then never used here
+ //
+ @SuppressWarnings("unused")
private PolicyDecoderCsarHpaParameters decoderParameters;
public static final String TOSCA_POLICY_SCOPE = "scope";
diff --git a/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/decoding/policy/file/PolicyDecoderFileInCsarToPolicy.java b/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/decoding/policy/file/PolicyDecoderFileInCsarToPolicy.java
index 4b58d2da..643785fa 100644
--- a/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/decoding/policy/file/PolicyDecoderFileInCsarToPolicy.java
+++ b/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/decoding/policy/file/PolicyDecoderFileInCsarToPolicy.java
@@ -2,6 +2,7 @@
* ============LICENSE_START=======================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
* Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2020 AT&T Inc.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -37,8 +38,6 @@ import org.onap.policy.distribution.reception.decoding.PolicyDecoder;
import org.onap.policy.distribution.reception.decoding.PolicyDecodingException;
import org.onap.policy.models.tosca.authorative.concepts.ToscaEntity;
import org.onap.policy.models.tosca.authorative.concepts.ToscaServiceTemplate;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
/**
* This class extracts policy files from a CSAR file.
@@ -47,7 +46,6 @@ import org.slf4j.LoggerFactory;
*/
public class PolicyDecoderFileInCsarToPolicy implements PolicyDecoder<Csar, ToscaEntity> {
- private static final Logger LOGGER = LoggerFactory.getLogger(PolicyDecoderFileInCsarToPolicy.class);
private PolicyDecoderFileInCsarToPolicyParameterGroup decoderParameters;
private StandardCoder coder;
@@ -87,9 +85,7 @@ public class PolicyDecoderFileInCsarToPolicy implements PolicyDecoder<Csar, Tosc
}
}
} catch (final IOException | CoderException exp) {
- final String message = "Failed decoding the policy";
- LOGGER.error(message, exp);
- throw new PolicyDecodingException(message, exp);
+ throw new PolicyDecodingException("Failed decoding the policy", exp);
}
return policyList;
diff --git a/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandler.java b/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandler.java
index 9c336327..b89a679b 100644
--- a/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandler.java
+++ b/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandler.java
@@ -2,6 +2,7 @@
* ============LICENSE_START=======================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
* Copyright (C) 2019 Nordix Foundation.
+ * Copyright (C) 2020 AT&T Inc.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -267,9 +268,7 @@ public class SdcReceptionHandler extends AbstractReceptionHandler implements INo
return tempArtifactFile.toPath();
}
} catch (final Exception exp) {
- final String message = "Failed to write artifact to local repository";
- LOGGER.error(message, exp);
- throw new ArtifactDownloadException(message, exp);
+ throw new ArtifactDownloadException("Failed to write artifact to local repository", exp);
}
}