Let mapstruct handle mapping of children collection

This commit is contained in:
René Pfeuffer
2018-10-16 14:52:54 +02:00
parent 2e283ef4b8
commit fb6e93e18a

View File

@@ -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) {