Sonar Qube code smell clean up 69/122069/2
authorDylanB95EST <dylan.byrne@est.tech>
Mon, 21 Jun 2021 11:19:26 +0000 (12:19 +0100)
committerDylan Byrne <dylan.byrne@est.tech>
Mon, 21 Jun 2021 11:28:47 +0000 (11:28 +0000)
Declaring Local Variable with Var Instead

Issue-ID: CPS-475

Change-Id: I94bb6d4a3234cd9abeba5a495bd2d0439c21c1df
Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
cps-rest/src/main/java/org/onap/cps/rest/controller/AdminRestController.java

index 57b6771..369ef01 100755 (executable)
@@ -103,7 +103,7 @@ public class AdminRestController implements CpsAdminApi {
     @Override
     public ResponseEntity<SchemaSetDetails> getSchemaSet(final String dataspaceName, final String schemaSetName) {
         final var schemaSet = cpsModuleService.getSchemaSet(dataspaceName, schemaSetName);
-        final SchemaSetDetails schemaSetDetails = modelMapper.map(schemaSet, SchemaSetDetails.class);
+        final var schemaSetDetails = modelMapper.map(schemaSet, SchemaSetDetails.class);
         return new ResponseEntity<>(schemaSetDetails, HttpStatus.OK);
     }
 
@@ -158,7 +158,7 @@ public class AdminRestController implements CpsAdminApi {
     @Override
     public ResponseEntity<AnchorDetails> getAnchor(final String dataspaceName, final String anchorName) {
         final var anchor = cpsAdminService.getAnchor(dataspaceName, anchorName);
-        final AnchorDetails anchorDetails = modelMapper.map(anchor, AnchorDetails.class);
+        final var anchorDetails = modelMapper.map(anchor, AnchorDetails.class);
         return new ResponseEntity<>(anchorDetails, HttpStatus.OK);
     }