Fixed vOut nullpointer exception 87/14087/1
authorshashikanth <shashikanth.vh@huawei.com>
Thu, 21 Sep 2017 05:30:20 +0000 (11:00 +0530)
committershashikanth <shashikanth.vh@huawei.com>
Thu, 21 Sep 2017 05:30:21 +0000 (11:00 +0530)
Fix Blocker/Critical sonar issues in aai/aai-common module
https://sonar.onap.org/component_issues?id=org.onap.aai.aai-common%3Aaai-common#resolved=false|severities=BLOCKER

NullPointerException might be thrown as 'vOut' is nullable here

Issue-Id:AAI-246
Change-Id: Idc3cc538bc65fc5a7350d6fe72406a5c4dca6f1c
Signed-off-by: shashikanth.vh <shashikanth.vh@huawei.com>
aai-core/src/main/java/org/openecomp/aai/dbgen/DataGrooming.java

index 8dca75c..f2d6a4b 100644 (file)
@@ -938,7 +938,7 @@ public class DataGrooming {
                                                                                if( (ghost2 != null) && ghost2FixOn ){
                                                                                        ghost2.remove();
                                                                                }
-                                                                               else {
+                                                                               else if (vOut != null) {
                                                                                        vOut.remove();
                                                                                }
                                                                                if (singleCommits) {