Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Error:(38, 25) java: cannot find symbol
- symbol: method orElseThrow(()->new Re[...]+ id))
- location: class com.idemia.oauth.entity.Domain
- public DomainDTO findById(Integer id) throws ResourceNotFoundException {
- Domain domain =
- domainRepository.findDomainById(id)
- .orElseThrow(() -> new ResourceNotFoundException(" On finding domain does not exist on :: " + id)); // ** getting error in lamda expression **** //
- return domainMapper.toDomainDTO(domain);
- }
- Domain domain =
- Optional.ofNullable(domainRepository.findDomainById(id))
- // ^-----------------^
- .orElseThrow(() -> new ResourceNotFoundException(" On finding domain does not exist on :: " + id));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement