From 61af63956d0fa9022667c56c8874d83be35c8102 Mon Sep 17 00:00:00 2001 From: Charles Cole Date: Tue, 26 Sep 2017 14:43:58 -0500 Subject: Fix Sonar criticals Fixed two Sonar criticals. Changed VFC actor service provider to eliminate redundant AAI queries. Issue-ID: POLICY-115 Change-Id: Ic4993b5d498a1cb3d3fc51ce1d2b4e90bb26353d Signed-off-by: Charles Cole --- .../main/java/org/onap/policy/simulators/VfcSimulatorJaxRs.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'controlloop/common/simulators/src/main/java') diff --git a/controlloop/common/simulators/src/main/java/org/onap/policy/simulators/VfcSimulatorJaxRs.java b/controlloop/common/simulators/src/main/java/org/onap/policy/simulators/VfcSimulatorJaxRs.java index 53ae7bc4b..0602717c7 100644 --- a/controlloop/common/simulators/src/main/java/org/onap/policy/simulators/VfcSimulatorJaxRs.java +++ b/controlloop/common/simulators/src/main/java/org/onap/policy/simulators/VfcSimulatorJaxRs.java @@ -30,6 +30,9 @@ import javax.servlet.http.HttpServletResponse; import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + @Path("/api/nslcm/v1") public class VfcSimulatorJaxRs { @@ -43,7 +46,11 @@ public class VfcSimulatorJaxRs { response.setStatus(HttpServletResponse.SC_ACCEPTED); try { response.flushBuffer(); - }catch(Exception e){} + }catch(Exception e){ + final Logger logger = LoggerFactory.getLogger(VfcSimulatorJaxRs.class); + logger.error("flushBuffer threw: ", e); + return ""; + } return "{\"jobId\":\"1\"}"; } -- cgit 1.2.3-korg