diff --git a/layout-server/pom.xml b/layout-server/pom.xml index ace79292f4..89d7ebd06c 100644 --- a/layout-server/pom.xml +++ b/layout-server/pom.xml @@ -14,7 +14,7 @@ layout-server layout-server - 17 + 11 diff --git a/layout-server/src/main/java/org/finos/vuu/layoutserver/controller/LayoutController.java b/layout-server/src/main/java/org/finos/vuu/layoutserver/controller/LayoutController.java index cc7814e807..f6a557bbe3 100644 --- a/layout-server/src/main/java/org/finos/vuu/layoutserver/controller/LayoutController.java +++ b/layout-server/src/main/java/org/finos/vuu/layoutserver/controller/LayoutController.java @@ -1,5 +1,7 @@ package org.finos.vuu.layoutserver.controller; +import java.util.List; +import java.util.UUID; import lombok.RequiredArgsConstructor; import org.finos.vuu.layoutserver.dto.request.LayoutRequestDTO; import org.finos.vuu.layoutserver.dto.response.CreateLayoutResponseDTO; @@ -19,9 +21,6 @@ import org.springframework.web.bind.annotation.ResponseStatus; import org.springframework.web.bind.annotation.RestController; -import java.util.List; -import java.util.UUID; - @RequiredArgsConstructor @RestController @RequestMapping("/layouts") @@ -50,9 +49,9 @@ public LayoutResponseDTO getLayout(@PathVariable UUID id) { public List getMetadata() { return layoutService.getMetadata() - .stream() - .map(metadata -> mapper.map(metadata, MetadataResponseDTO.class)) - .toList(); + .stream() + .map(metadata -> mapper.map(metadata, MetadataResponseDTO.class)) + .collect(java.util.stream.Collectors.toList()); } /** @@ -80,7 +79,8 @@ public CreateLayoutResponseDTO createLayout(@RequestBody LayoutRequestDTO layout @ResponseStatus(HttpStatus.NO_CONTENT) @PutMapping("/{id}") public void updateLayout(@PathVariable UUID id, @RequestBody LayoutRequestDTO newLayout) { - // TODO I'm not sure about this, I think layoutService should be doing more logic, not the mapper here + // TODO I'm not sure about this, I think layoutService should be doing more logic, not + // the mapper here Layout layout = layoutService.getLayout(id); mapper.map(newLayout, layout);