Advertisement
Guest User

Untitled

a guest
Oct 16th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.34 KB | None | 0 0
  1. Plan plan = Optional.ofNullable(planRepository.findOne(planId)).orElseThrow(
  2.     () -> new PlanNotFoundException(planId, PlanNotFoundException.PlanNotFoundExceptionCode.PLAN_NOT_FOUND_FOR_ID));
  3.    
  4. if (!planRepository.exists(planId))
  5.     throw new PlanNotFoundException(planId, PlanNotFoundException.PlanNotFoundExceptionCode.PLAN_NOT_FOUND_FOR_ID);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement