diff options
author | 2020-04-22 09:19:23 +0000 | |
---|---|---|
committer | 2020-04-22 09:19:23 +0000 | |
commit | 57a2c9b404925469fa8c88cdf359ef7e04535038 (patch) | |
tree | e273bc438a847016b06d01c9f7a303b3d9e50c93 /pnfsimulator/src/main | |
parent | b59fe96e4a782e447ef7fcee4a3f8275a1f90688 (diff) | |
parent | 24f3c0feb24d197be93908ae4a8f9c12d4a287d4 (diff) |
Merge "Fix sonar issue SimulatorController"
Diffstat (limited to 'pnfsimulator/src/main')
-rw-r--r-- | pnfsimulator/src/main/java/org/onap/pnfsimulator/rest/SimulatorController.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/pnfsimulator/src/main/java/org/onap/pnfsimulator/rest/SimulatorController.java b/pnfsimulator/src/main/java/org/onap/pnfsimulator/rest/SimulatorController.java index 401dc77..023b163 100644 --- a/pnfsimulator/src/main/java/org/onap/pnfsimulator/rest/SimulatorController.java +++ b/pnfsimulator/src/main/java/org/onap/pnfsimulator/rest/SimulatorController.java @@ -94,11 +94,15 @@ public class SimulatorController { this.eventDataService = eventDataService; } + /** + * @deprecated + */ @PostMapping("test") @Deprecated public ResponseEntity<Map<String,Object>> test(@Valid @RequestBody SimulatorRequest simulatorRequest) { MDC.put("test", "test"); - LOGGER.info(ENTRY, simulatorRequest.toString()); + String simulatorRequestString = simulatorRequest.toString(); + LOGGER.info(ENTRY, simulatorRequestString); return buildResponse(OK, ImmutableMap.of(MESSAGE, "message1234")); } @@ -138,6 +142,9 @@ public class SimulatorController { } } + /** + * @deprecated + */ @GetMapping("all-events") @Deprecated public ResponseEntity<Map<String,Object>> allEvents() { @@ -164,7 +171,8 @@ public class SimulatorController { @PostMapping("cancel/{jobName}") public ResponseEntity<Map<String,Object>> cancelEvent(@PathVariable String jobName) throws SchedulerException { - LOGGER.info(ENTRY, "Cancel called on {}.", replaceBreakingCharacters(jobName)); + String jobNameNoBreakingCharacters = replaceBreakingCharacters(jobName); + LOGGER.info(ENTRY, "Cancel called on {}.", jobNameNoBreakingCharacters); boolean isCancelled = simulatorService.cancelEvent(jobName); return createCancelEventResponse(isCancelled); } |