Skip to content

Commit

Permalink
fix sonar
Browse files Browse the repository at this point in the history
  • Loading branch information
jamal-khey committed Jun 24, 2024
1 parent f5e0cff commit 78842e8
Showing 1 changed file with 0 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,6 @@ public void saveElementsInfos(@NonNull List<DirectoryElementInfos> directoryElem
.forEach(directoryElementInfosRepository::saveAll);
}

String getFullPathName(DirectoryElementEntity elementEntity, List<DirectoryElementEntity> ascendants) {
List<String> pathName = new ArrayList<>(ascendants.stream().map(DirectoryElementEntity::getName).toList());
String fullPathName = pathName.stream().reduce("", (s1, s2) -> s1 + "/" + s2);
if (elementEntity.getType().equals("DIRECTORY")) {
pathName.add(elementEntity.getName());
}
return fullPathName.toString();
}

String getFullPathUuid(DirectoryElementEntity elementEntity, List<DirectoryElementEntity> ascendants) {
List<UUID> pathUuid = new ArrayList<>(ascendants.stream().map(DirectoryElementEntity::getId).toList());
if (elementEntity.getType().equals("DIRECTORY")) {
Expand Down Expand Up @@ -166,7 +157,4 @@ public List<DirectoryElementEntity> findElementHierarchy(UUID elementId) {
return directoryElementRepository.findElementHierarchy(elementId);
}

private List<DirectoryElementEntity> findAllDescendants(UUID elementId) {
return directoryElementRepository.findAllDescendants(elementId);
}
}

0 comments on commit 78842e8

Please sign in to comment.