ofuks commented on a change in pull request #982:
URL: https://github.com/apache/incubator-datalab/pull/982#discussion_r525190880
##########
File path: README.md
##########
@@ -2143,6 +2143,7 @@ mongoimport -u admin -p <password> -d <database_name> -c
settings mongo_settings
mongoimport -u admin -p <password> -d <database_name> --jsonArray -c roles
mongo_roles.json
```
+
Review comment:
Do we need this empty line here?
##########
File path:
services/self-service/src/main/java/com/epam/datalab/backendapi/service/impl/EndpointServiceImpl.java
##########
@@ -156,7 +157,10 @@ public void removeEndpoint(@User UserInfo userInfo,
@ResourceName String name, C
@Override
public void removeEndpointInAllProjects(UserInfo userInfo, String
endpointName, List<ProjectDTO> projects) {
- projects.forEach(project -> projectService.terminateEndpoint(userInfo,
endpointName, project.getName()));
+ projects.stream()
+ .filter(p -> p.getEndpoints().stream()
+ .noneMatch(e->e.getName().equals(endpointName) &&
e.getStatus().equals(UserInstanceStatus.TERMINATED)))
Review comment:
1. Please reformat the code
2. Can we use **equals** for enum?
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]