diff options
author | shashikanth <shashikanth.vh@huawei.com> | 2017-09-22 16:52:23 +0530 |
---|---|---|
committer | Shashikanth VH <shashikanth.vh@huawei.com> | 2017-09-22 11:38:39 +0000 |
commit | 0e6adf5e9464573b814f85e8192972483678d3ee (patch) | |
tree | 13c799987c3546450e5c504a708afba46a0c2d06 /aai-resources/src/main/java | |
parent | 30402974352f2b3cbb6a824e6306560a94c28007 (diff) |
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
Issue fixed: NullPointerException might be thrown as 'actionElement' is nullable here
Issue-Id:AAI-247
Change-Id: I7360fc0b8812fac2fdf280e62fe3da2652a152af
Signed-off-by: shashikanth.vh <shashikanth.vh@huawei.com>
Diffstat (limited to 'aai-resources/src/main/java')
-rw-r--r-- | aai-resources/src/main/java/org/openecomp/aai/rest/BulkConsumer.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/aai-resources/src/main/java/org/openecomp/aai/rest/BulkConsumer.java b/aai-resources/src/main/java/org/openecomp/aai/rest/BulkConsumer.java index 951c9ff..7ec6bbf 100644 --- a/aai-resources/src/main/java/org/openecomp/aai/rest/BulkConsumer.java +++ b/aai-resources/src/main/java/org/openecomp/aai/rest/BulkConsumer.java @@ -301,7 +301,7 @@ public abstract class BulkConsumer extends RESTAPI { actionElement = item.get("delete"); } - if (!actionElement.isJsonArray()) { + if ((actionElement == null) || !actionElement.isJsonArray()) { throw new AAIException("AAI_6111", "input payload does not follow bulk add interface"); } JsonArray httpArray = actionElement.getAsJsonArray(); |