Skip to content

Commit

Permalink
fix sonar style issus
Browse files Browse the repository at this point in the history
Signed-off-by: jamal-khey <[email protected]>
  • Loading branch information
jamal-khey committed Sep 29, 2023
1 parent be15241 commit 994638b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,9 @@ public ResponseEntity<List<ModificationInfos>> getNetworkModifications(@Paramete
@Parameter(description = "Only metadata") @RequestParam(name = "onlyMetadata", required = false, defaultValue = "false") Boolean onlyMetadata,
@Parameter(description = "Stashed modifications") @RequestParam(name = "stashed", required = false) Boolean stashed,
@Parameter(description = "Return 404 if group is not found or an empty list") @RequestParam(name = "errorOnGroupNotFound", required = false, defaultValue = "true") Boolean errorOnGroupNotFound) {
if(stashed == null) {
if (stashed == null) {
return ResponseEntity.ok().body(networkModificationService.getAllNetworkModificationsWithMetaData(groupUuid, errorOnGroupNotFound));
}
else {
} else {
return ResponseEntity.ok().body(networkModificationService.getNetworkModifications(groupUuid, onlyMetadata, errorOnGroupNotFound, stashed));
}
}
Expand Down Expand Up @@ -215,7 +214,6 @@ public ResponseEntity<UUID> createModificationInGroup(@RequestBody ModificationI
return ResponseEntity.ok().body(networkModificationService.createModificationInGroup(modificationsInfos));
}


@PutMapping(value = "/groups/{groupUuid}/duplications", produces = MediaType.APPLICATION_JSON_VALUE)
@Operation(summary = "Duplicate all modifications in a group and append them at the end of another modifications group")
@ApiResponse(responseCode = "200", description = "The modifications have been duplicated")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public List<ModificationInfos> getAllNetworkModificationsWithMetaData(UUID group
//put metadata in a hashmap
Map<UUID, ModificationInfos> metaDataMap = metaData.stream().collect(Collectors.toMap(ModificationInfos::getUuid, m -> m));

modificationInfosMap.forEach((uuid,modificationInfos) -> {
modificationInfosMap.forEach((uuid, modificationInfos) -> {
ModificationInfos metadata = metaDataMap.get(uuid);
if (modificationInfos != null) {
modificationInfos.setStashed(metadata.getStashed());
Expand Down

0 comments on commit 994638b

Please sign in to comment.