From 3276ac64bde54363c4dfa9b108bd3d4736999a32 Mon Sep 17 00:00:00 2001 From: Arindam Mondal Date: Fri, 27 Jul 2018 13:11:04 +0900 Subject: Fix sonar reported NPE issue Issue-ID: MODELING-107 Change-Id: I285e3dfbf104a68929185545d1a29140820b99b5 Signed-off-by: ONAP --- .../checker/src/main/java/org/onap/tosca/checker/Workflows.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/javatoscachecker/checker/src/main/java/org/onap/tosca/checker/Workflows.java b/javatoscachecker/checker/src/main/java/org/onap/tosca/checker/Workflows.java index 3f6a445..eb9b241 100644 --- a/javatoscachecker/checker/src/main/java/org/onap/tosca/checker/Workflows.java +++ b/javatoscachecker/checker/src/main/java/org/onap/tosca/checker/Workflows.java @@ -241,7 +241,7 @@ public class Workflows { } String targetRelationship = (String)theDef.get("target_relationship"); - if (targetRelationship != null) { + if (targetRelationship != null && targetConstruct!=null ) { if (targetConstruct.equals(Construct.Node)) { //'The optional name of a requirement of the target in case the step refers to a relationship rather than a node or group' if (null == theContext.catalog().getRequirementDefinition(Construct.Node, -- cgit 1.2.3-korg