diff options
author | 2019-03-28 15:39:20 +0100 | |
---|---|---|
committer | 2019-04-05 11:08:59 +0200 | |
commit | 85fa078bfabea17ffdafcdf2748d1a877f00a3b0 (patch) | |
tree | e13d757f1d1f4d47cd24b45e7cee4e4ecad2c015 /src/main/java/org/onap/dcae/restapi/VesRestController.java | |
parent | d4766e8b38e68ddb97a91c4646455b1340d5acba (diff) |
Fix sonar violation
Fix sonar violation
Change-Id: I72d7c4a7ac127b9ec89e8a144d934aa96884fc6a
Issue-ID: DCAEGEN2-1016
Signed-off-by: Adam Wudzinski <adam.wudzinski@nokia.com>
Diffstat (limited to 'src/main/java/org/onap/dcae/restapi/VesRestController.java')
-rw-r--r-- | src/main/java/org/onap/dcae/restapi/VesRestController.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/org/onap/dcae/restapi/VesRestController.java b/src/main/java/org/onap/dcae/restapi/VesRestController.java index 510031df..3102c31c 100644 --- a/src/main/java/org/onap/dcae/restapi/VesRestController.java +++ b/src/main/java/org/onap/dcae/restapi/VesRestController.java @@ -53,11 +53,11 @@ import org.springframework.web.bind.annotation.RestController; @RestController public class VesRestController { - private static final Logger log = LoggerFactory.getLogger(VesRestController.class); + private static final Logger log = LoggerFactory.getLogger(VesRestController.class); + private static final String INVALID_JSON = ApiException.INVALID_JSON_INPUT.toJSON().toString(); private final ApplicationSettings applicationSettings; private final LinkedBlockingQueue<JSONObject> inputQueue; - private final Logger metricsLog; private final Logger errorLog; private final Logger incomingRequestsLogger; @@ -101,7 +101,8 @@ public class VesRestController { try { jsonObject = new JSONObject(jsonPayload); } catch (Exception e) { - return ResponseEntity.badRequest().body(ApiException.INVALID_JSON_INPUT.toJSON().toString()); + log.error(INVALID_JSON); + return ResponseEntity.badRequest().body(INVALID_JSON); } String uuid = setUpECOMPLoggingForRequest(); |