diff options
author | shivasubedi <shiva.subedi@est.tech> | 2021-04-26 17:51:04 +0100 |
---|---|---|
committer | Rishi Chail <rishi.chail@est.tech> | 2021-04-28 10:14:20 +0000 |
commit | a439dfa869d7ba55daeb97ae16735c3fd0a12985 (patch) | |
tree | 6ed309a7efd31b42667a94da1ca9462f13991f83 /cps-ncmp-rest/src/main | |
parent | d006d121ed9044caa1b769cca931fc183c448a3b (diff) |
Fix Code smells
Issue-ID: CPS-89
Change-Id: Ib1b6fbc6b6d712f169100825683e6db3e7c85cb9
Signed-off-by: shivasubedi <shiva.subedi@est.tech>
Diffstat (limited to 'cps-ncmp-rest/src/main')
2 files changed, 2 insertions, 2 deletions
diff --git a/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java b/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java index 0c877f8ab7..83b47e8ce9 100755 --- a/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java +++ b/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java @@ -59,7 +59,7 @@ public class NetworkCmProxyController implements NetworkCmProxyApi { @Valid final Boolean includeDescendants) { final FetchDescendantsOption fetchDescendantsOption = Boolean.TRUE.equals(includeDescendants) ? FetchDescendantsOption.INCLUDE_ALL_DESCENDANTS : FetchDescendantsOption.OMIT_DESCENDANTS; - final DataNode dataNode = networkCmProxyDataService.getDataNode(cmHandle, xpath, fetchDescendantsOption); + final var dataNode = networkCmProxyDataService.getDataNode(cmHandle, xpath, fetchDescendantsOption); return new ResponseEntity<>(DataMapUtils.toDataMap(dataNode), HttpStatus.OK); } diff --git a/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/exceptions/NetworkCmProxyRestExceptionHandler.java b/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/exceptions/NetworkCmProxyRestExceptionHandler.java index bb922e781b..c91b821d66 100755 --- a/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/exceptions/NetworkCmProxyRestExceptionHandler.java +++ b/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/exceptions/NetworkCmProxyRestExceptionHandler.java @@ -61,7 +61,7 @@ public class NetworkCmProxyRestExceptionHandler { if (exception.getCause() != null || !(exception instanceof CpsException)) { log.error("Exception occurred", exception); } - final ErrorMessage errorMessage = new ErrorMessage(); + final var errorMessage = new ErrorMessage(); errorMessage.setStatus(status.toString()); errorMessage.setMessage(exception.getMessage()); errorMessage.setDetails(exception instanceof CpsException ? ((CpsException) exception).getDetails() : |