-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Graph #83
Conversation
|
||
Set<ServiceContracts> serviceContractsSet = environmentRepository.get(env).getAllServices().stream() | ||
.map(service -> | ||
serviceContractsRepository.find(service.getName(), service.getVersion()).orElseGet( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would extract it to private method
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
.map(service -> | ||
serviceContractsRepository.find(service.getName(), service.getVersion()).orElseGet( | ||
() -> new ServiceContracts(service.getName(), service.getVersion(), new HashMap<>(), new HashMap<>()))) | ||
.collect(Collectors.toSet()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe add another .map
here to build dtos so below you will be able to write just return new InterrelationshipDto(env, serviceContractsSet);
private final ServiceContractsRepository serviceContractsRepository; | ||
private final ContractsMapper contractsMapper; | ||
|
||
@Autowired |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use lombok?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was not used throughout the project in this case, we should introduce it globally
No description provided.