Skip to content
Permalink
Browse files
spring data
  • Loading branch information
fiammara committed Oct 14, 2019
1 parent c8415d4 commit 0b6a461d30c0cf83db8a8d047d2d8d783545e020
Showing 1 changed file with 3 additions and 2 deletions.
@@ -29,6 +29,7 @@




/**
* Pet store database application.
* <p>
@@ -110,7 +111,7 @@ public PetStoreService initDirect(PrintWriter w) throws ParseException, IOExcept
* @throws IdNotFound If pet was not found.
*/
public Pet getPet(long id) throws IdNotFound {
return petRepository.getOne(id);
return petRepository.findById(id).get();
}

/**
@@ -121,7 +122,7 @@ public Pet getPet(long id) throws IdNotFound {
* @throws IdNotFound If order was not found.
*/
public Order getOrder(long id) throws IdNotFound {
return orderRepository.getOne(id);
return orderRepository.findById(id).get();
}

/**

0 comments on commit 0b6a461

Please sign in to comment.