diff --git a/lesson_14/exceptions/exceptions_app/src/main/java/com/codedifferently/lesson14/ecommerce/Order.java b/lesson_14/exceptions/exceptions_app/src/main/java/com/codedifferently/lesson14/ecommerce/Order.java index 501eacbc..d1a3d56a 100644 --- a/lesson_14/exceptions/exceptions_app/src/main/java/com/codedifferently/lesson14/ecommerce/Order.java +++ b/lesson_14/exceptions/exceptions_app/src/main/java/com/codedifferently/lesson14/ecommerce/Order.java @@ -11,15 +11,15 @@ public Order(String orderId, Product product, int quantity) { this.quantity = quantity; } - public String getOrderId() throws OrderNotFoundException { + public String getOrderId(){ return orderId; } - public Product getProduct() throws OrderNotFoundException { + public Product getProduct() { return product; } - public int getQuantity() throws OrderNotFoundException { + public int getQuantity() { return quantity; } } diff --git a/lesson_14/exceptions/exceptions_app/src/main/java/com/codedifferently/lesson14/ecommerce/Product.java b/lesson_14/exceptions/exceptions_app/src/main/java/com/codedifferently/lesson14/ecommerce/Product.java index d3603568..f3ac1d8b 100644 --- a/lesson_14/exceptions/exceptions_app/src/main/java/com/codedifferently/lesson14/ecommerce/Product.java +++ b/lesson_14/exceptions/exceptions_app/src/main/java/com/codedifferently/lesson14/ecommerce/Product.java @@ -9,11 +9,11 @@ public Product(String productId, String name) { this.name = name; } - public String getProductId() throws ProductNotFoundException { + public String getProductId() { return productId; } - public String getName() throws ProductNotFoundException { + public String getName() { return name; } }