From 0ed8ba7e8d89309e860a5e8dea5bb43931496e5c Mon Sep 17 00:00:00 2001 From: Sumapriya Sarvepalli Date: Tue, 14 Aug 2018 11:19:37 +0530 Subject: Sonar major issues This block of commented-out lines of code should be removed Sonar Link: https://sonar.onap.org/project/issues?assignees=sumapriya&id=org.onap.portal.sdk%3Aepsdk-project&open=AV_om9w5-08if2a6uh0R&resolved=false Location: ecomp-sdk/ONAP Portal SDK Webapp/ Common/src/main/java/org/onap/portalapp/controller/sample/PostDroolsController.java Line No: L78 L100 L129 Change-Id: Id85ee4482679942031fee8c57571b2415d6b15fe Issue-ID: PORTAL-355 Signed-off-by: Sumapriya Sarvepalli --- .../org/onap/portalapp/controller/sample/PostDroolsController.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'ecomp-sdk/epsdk-app-common/src/main') diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/PostDroolsController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/PostDroolsController.java index fb0338ea..43d548f9 100644 --- a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/PostDroolsController.java +++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/PostDroolsController.java @@ -75,7 +75,7 @@ public class PostDroolsController extends RestrictedBaseController { @RequestMapping(value = { "/getDrools" }, method = RequestMethod.GET) public void getDrools(HttpServletRequest request, HttpServletResponse response) { - // Map model = new HashMap(); + ObjectMapper mapper = new ObjectMapper(); try { @@ -97,7 +97,6 @@ public class PostDroolsController extends RestrictedBaseController { PostDroolsBean postDroolsBean = new PostDroolsBean(); String selectedFile = request.getParameter("selectedFile"); postDroolsBean.setDroolsFile(selectedFile);// sample populated - // postDroolsBean.setSelectedRules("[\"NJ\",\"NY\",\"KY\"]"); postDroolsBean.setClassName(postDroolsService.retrieveClass(selectedFile)); JsonMessage msg = new JsonMessage(mapper.writeValueAsString(postDroolsBean)); @@ -126,7 +125,6 @@ public class PostDroolsController extends RestrictedBaseController { request.setCharacterEncoding("UTF-8"); PrintWriter out = response.getWriter(); - // String responseString = mapper.writeValueAsString(resultsString); JSONObject j = new JSONObject("{resultsString: " + resultsString + "}"); out.write(j.toString()); -- cgit 1.2.3-korg