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>
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();