Fix Blocker/Critical sonar issues in aai/sparky-be module
https://sonar.onap.org/component_issues?id=org.openecomp.aai.sparky-be%3Asparky-be#resolved=false|severities=BLOCKER
Fixed NullPointerException might be thrown as 'output' is nullable here
Issue-Id:AAI-342
Change-Id: I816854cf784e9825c269110ea44c0c7ed745e946
Signed-off-by: shashikanth.vh <shashikanth.vh@huawei.com>
try {
output = transformer
.generateVisualizationOutput((System.currentTimeMillis() - opStartTimeInMs), graphMeta);
- } catch (JsonProcessingException exc) {
- throw new ServletException("Caught an exception while generation visualization output", exc);
- } catch (IOException exc) {
+ } catch (Exception exc) {
LOG.error(AaiUiMsgs.FAILURE_TO_PROCESS_REQUEST, exc.getLocalizedMessage());
+ throw new ServletException("Caught an exception while generation visualization output", exc);
}
output.setInlineMessage(visContext.getInlineMessage());