Skip to content

Commit 6a652e5

Browse files
author
Yafiaha
committed
fix-up
1 parent bd77506 commit 6a652e5

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

lesson_14/exceptions/exceptions_app/src/main/java/com/codedifferently/lesson14/ecommerce/EcommerceSystem.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public void addProduct(String productId, String name) {
1717
products.put(productId, new Product(productId, name));
1818
}
1919

20-
public String placeOrder(String productId, int quantity) throws ProductNotFoundException{
20+
public String placeOrder(String productId, int quantity) throws ProductNotFoundException {
2121
Product product = products.get(productId);
2222
if (product == null) {
2323
throw new ProductNotFoundException("Product with ID " + productId + " not found");
@@ -31,7 +31,7 @@ public void cancelOrder(String orderId) {
3131
orders.remove(orderId);
3232
}
3333

34-
public String checkOrderStatus(String orderId) throws OrderNotFoundException{
34+
public String checkOrderStatus(String orderId) throws OrderNotFoundException {
3535
Order order = orders.get(orderId);
3636
if (order == null) {
3737
throw new OrderNotFoundException("Order with ID " + orderId + " not found");

lesson_14/exceptions/exceptions_app/src/main/java/com/codedifferently/lesson14/ecommerce/OrderNotFoundException.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@
55

66
package com.codedifferently.lesson14.ecommerce;
77

8-
class OrderNotFoundException extends RuntimeException{
8+
class OrderNotFoundException extends RuntimeException {
99
public OrderNotFoundException(String message) {
10-
super(message);
10+
super(message);
1111
}
1212
}
13-

lesson_14/exceptions/exceptions_app/src/main/java/com/codedifferently/lesson14/ecommerce/ProductNotFoundException.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
package com.codedifferently.lesson14.ecommerce;
77

88
class ProductNotFoundException extends RuntimeException {
9-
public ProductNotFoundException(String message) {
10-
super(message);
11-
}
9+
public ProductNotFoundException(String message) {
10+
super(message);
11+
}
1212
}

0 commit comments

Comments
 (0)