Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Plan plan = Optional.ofNullable(planRepository.findOne(planId)).orElseThrow(
- () -> new PlanNotFoundException(planId, PlanNotFoundException.PlanNotFoundExceptionCode.PLAN_NOT_FOUND_FOR_ID));
- if (!planRepository.exists(planId))
- throw new PlanNotFoundException(planId, PlanNotFoundException.PlanNotFoundExceptionCode.PLAN_NOT_FOUND_FOR_ID);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement