From: shashikanth Date: Wed, 20 Sep 2017 08:50:02 +0000 (+0530) Subject: Fix Blocker/Critical sonar issues X-Git-Tag: v1.1.0~13 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=30402974352f2b3cbb6a824e6306560a94c28007;p=aai%2Fresources.git Fix Blocker/Critical sonar issues Fix Blocker/Critical sonar issues in aai/resources module https://sonar.onap.org/component_issues?id=org.onap.aai.resources%3Aresources#resolved=false|severities=BLOCKER Fixed NullPointerException might be thrown as 'oldProp' is nullable here Issue-Id:AAI-247 Change-Id: I83103832cc3e6de9a769ba27c9576e929e94e08d Signed-off-by: shashikanth.vh --- diff --git a/aai-resources/src/main/java/org/openecomp/aai/rest/tools/ModelVersionTransformer.java b/aai-resources/src/main/java/org/openecomp/aai/rest/tools/ModelVersionTransformer.java index 141d71aa..d840b901 100644 --- a/aai-resources/src/main/java/org/openecomp/aai/rest/tools/ModelVersionTransformer.java +++ b/aai-resources/src/main/java/org/openecomp/aai/rest/tools/ModelVersionTransformer.java @@ -285,7 +285,7 @@ public class ModelVersionTransformer extends RESTAPI { oldVal = oldRelationshipDatum.getValue("relationship-value"); } - if (oldProp.equals("model.model-name-version-id")) { + if ("model.model-name-version-id".equals(oldProp)) { // make two new relationshipDatum for use w/ the new style model // you should have the model in the list of models we collected earlier