diff options
author | 2019-11-08 10:53:56 +0000 | |
---|---|---|
committer | 2019-11-10 06:50:57 +0000 | |
commit | 57a8c14ed7b5ef6b39b7e63e76d14dfcac32fb69 (patch) | |
tree | 6515dbe523e20375fbb4a661c0e4b68624bd8ea5 /openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/main/java/org/openecomp | |
parent | 3042f71ec5761450e46a3f22c3eb46a117771145 (diff) |
Fix sonarQube issue.
Issue-ID: SDC-2646
Change-Id: Ic426e1cccf50e3db40381896ee50b74e647129ee
Signed-off-by: aribeiro <anderson.ribeiro@est.tech>
Diffstat (limited to 'openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/main/java/org/openecomp')
2 files changed, 6 insertions, 2 deletions
diff --git a/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/main/java/org/openecomp/core/converter/impl/pnfd/PnfdNodeTemplateTransformationEngine.java b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/main/java/org/openecomp/core/converter/impl/pnfd/PnfdNodeTemplateTransformationEngine.java index b2038a00dd..3c996462fe 100644 --- a/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/main/java/org/openecomp/core/converter/impl/pnfd/PnfdNodeTemplateTransformationEngine.java +++ b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/main/java/org/openecomp/core/converter/impl/pnfd/PnfdNodeTemplateTransformationEngine.java @@ -81,6 +81,9 @@ public class PnfdNodeTemplateTransformationEngine extends AbstractPnfdTransforma */ @Override protected void executeTransformations() { + if (transformationDescription == null) { + return; + } final Set<Transformation> transformationSet = transformationDescription.getTransformationSet(); if (CollectionUtils.isEmpty(transformationSet)) { return; diff --git a/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/main/java/org/openecomp/core/converter/impl/pnfd/parser/TransformationYamlParser.java b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/main/java/org/openecomp/core/converter/impl/pnfd/parser/TransformationYamlParser.java index 6ad04b0f7a..92e1d8f392 100644 --- a/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/main/java/org/openecomp/core/converter/impl/pnfd/parser/TransformationYamlParser.java +++ b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/main/java/org/openecomp/core/converter/impl/pnfd/parser/TransformationYamlParser.java @@ -181,8 +181,9 @@ public class TransformationYamlParser { private static Optional<String> parseStringAttribute(final String attribute, final Map<String, Object> transformationYaml) { try { return Optional.of((String) transformationYaml.get(attribute)); - } catch (final Exception ignore) { - LOGGER.warn("Could not parse the String '{}' in transformation '{}'", attribute, transformationYaml.toString()); + } catch (final Exception e) { + LOGGER.warn("Could not parse the String '{}' in transformation '{}'", + attribute, transformationYaml.toString(), e); return Optional.empty(); } } |