Skip to content

Instantly share code, notes, and snippets.

@j4cksw
Created May 16, 2016 15:46
Show Gist options
  • Select an option

  • Save j4cksw/56d2b00cd63fe1f31c5d18611478d600 to your computer and use it in GitHub Desktop.

Select an option

Save j4cksw/56d2b00cd63fe1f31c5d18611478d600 to your computer and use it in GitHub Desktop.
public class UsersResource {
public User findUserById(String userId){
User result = userDAO.findById(userId);
if( result == null ){
throw new RuntimeException(String.format("User not found by id %s", userId));
}
return result;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment