ofuks commented on a change in pull request #659: [DLAB-1623] Stopping of the
Edge node
URL: https://github.com/apache/incubator-dlab/pull/659#discussion_r393690095
##########
File path:
services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/ProjectServiceImpl.java
##########
@@ -165,15 +165,17 @@ public void stop(UserInfo userInfo, List<String>
endpoints, String name) {
}
@Override
- public void stopWithResources(UserInfo userInfo, String projectName) {
- List<ProjectEndpointDTO> endpoints =
get(projectName).getEndpoints();
- checkProjectRelatedResourcesInProgress(projectName, endpoints,
STOP_ACTION);
+ public void stopWithResources(UserInfo userInfo, List<String>
endpoints, String projectName) {
+ List<ProjectEndpointDTO> endpointDTOS = get(projectName)
+ .getEndpoints().stream().
+ filter(projectEndpointDTO ->
endpoints.contains(projectEndpointDTO.getName())).collect(Collectors.toList());
Review comment:
Lets follow stream convention:
list
.stream()
.filter()
.collect()
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]