Order#9
Conversation
|
|
||
| private final String value; | ||
|
|
||
| private OrderStatus(String value) { |
Check warning
Code scanning / PMD
Unnecessary modifier 'public' on method 'getAllPayments': the method is declared in an interface type
| } | ||
|
|
||
| public static boolean contains(String param) { | ||
| for (OrderStatus orderStatus : OrderStatus.values()) { |
Check warning
Code scanning / PMD
Unnecessary qualifier 'PaymentStatus': 'values' is already in scope
| import java.util.List; | ||
|
|
||
| public interface OrderService { | ||
| public Order createOrder(Order order); |
Check warning
Code scanning / PMD
Unnecessary modifier 'public' on method 'getAllPayments': the method is declared in an interface type
|
|
||
| public interface OrderService { | ||
| public Order createOrder(Order order); | ||
| public Order updateStatus(String orderId, String status); |
Check warning
Code scanning / PMD
Unnecessary modifier 'public' on method 'getAllPayments': the method is declared in an interface type
| public interface OrderService { | ||
| public Order createOrder(Order order); | ||
| public Order updateStatus(String orderId, String status); | ||
| public Order findById(String orderId); |
Check warning
Code scanning / PMD
Unnecessary modifier 'public' on method 'getAllPayments': the method is declared in an interface type
| public interface PaymentService { | ||
| public Payment addPayment(String paymentId, Order order, String method, Map<String, String> paymentData); | ||
| public Payment setStatus(Payment payment, String status); | ||
| public Payment getPayment(String paymentId); |
Check warning
Code scanning / PMD
Unnecessary modifier 'public' on method 'getAllPayments': the method is declared in an interface type
| public Payment addPayment(String paymentId, Order order, String method, Map<String, String> paymentData); | ||
| public Payment setStatus(Payment payment, String status); | ||
| public Payment getPayment(String paymentId); | ||
| public List<Payment> getAllPayments(); |
Check warning
Code scanning / PMD
Unnecessary modifier 'public' on method 'getAllPayments': the method is declared in an interface type
|
|
||
| import java.util.List; | ||
| import java.util.Map; | ||
| import java.util.NoSuchElementException; |
Check warning
Code scanning / PMD
Unused import 'java.util.NoSuchElementException'
| @Override | ||
| public Payment setStatus(Payment payment, String status) { | ||
| Order currentOrder = payment.getOrder(); | ||
| if (status.equals("SUCCESS")) { |
Check warning
Code scanning / PMD
Position literals first in String comparisons
| Order currentOrder = payment.getOrder(); | ||
| if (status.equals("SUCCESS")) { | ||
| currentOrder.setStatus(OrderStatus.SUCCESS.getValue()); | ||
| } else if (status.equals("REJECTED")) { |
Check warning
Code scanning / PMD
Position literals first in String comparisons
No description provided.