mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-14 17:26:22 +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());
|
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) {
|
private String removeFirstSlash(String source) {
|
||||||
|
|||||||
Reference in New Issue
Block a user