summaryrefslogtreecommitdiffstats
path: root/pnfsimulator/src/main
diff options
context:
space:
mode:
authorAleksandra Maciaga <aleksandra.maciaga@nokia.com>2020-04-21 14:59:06 +0200
committerAleksandra Maciaga <aleksandra.maciaga@nokia.com>2020-04-22 09:35:08 +0200
commit24f3c0feb24d197be93908ae4a8f9c12d4a287d4 (patch)
treeb5d39f5a966e21ea207f401378db6e820402497d /pnfsimulator/src/main
parent6528bdf36e6eee2aae7f4a83395821c13619c6bb (diff)
Fix sonar issue SimulatorController
Issue-ID: INT-1517 Signed-off-by: Aleksandra Maciaga <aleksandra.maciaga@nokia.com> Change-Id: I7af9529be268cb40922868ee62e3318509166287
Diffstat (limited to 'pnfsimulator/src/main')
-rw-r--r--pnfsimulator/src/main/java/org/onap/pnfsimulator/rest/SimulatorController.java12
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);
}