mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-12 08:25:44 +01:00
Let mapstruct handle mapping of children collection
This commit is contained in:
@@ -40,13 +40,6 @@ public abstract class FileObjectToFileObjectDtoMapper implements InstantAttribut
|
||||
}
|
||||
|
||||
dto.add(links.build());
|
||||
if (fileObject.isDirectory() && fileObject.hasChildren()) {
|
||||
List<FileObjectDto> children = fileObject.getChildren()
|
||||
.stream()
|
||||
.map(fo -> map(fo, namespaceAndName, revision))
|
||||
.collect(Collectors.toList());
|
||||
dto.setChildren(children);
|
||||
}
|
||||
}
|
||||
|
||||
private String removeFirstSlash(String source) {
|
||||
|
||||
Reference in New Issue
Block a user