this post was submitted on 02 Oct 2023
1532 points (98.4% liked)

Programmer Humor

33546 readers
340 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] reverendsteveii@lemm.ee 15 points 1 year ago* (last edited 1 year ago)

`/* Gets CustomerEntity from customer repository by customer ID or throws a customer not found exception */

public CustomerEntity getCustomerEntityById(String customerId){ customerRepository.findById(customerId).orElseThrow(new CustomerNotFoundException()) }`