Merge pull request #11000 from kwoyke/JAVA-6091
JAVA-6091: Fix enum comparison
This commit is contained in:
commit
1660e33cf9
|
@ -21,7 +21,7 @@ public class CustomerService {
|
|||
final ObjectMapper mapper = new ObjectMapper();
|
||||
final Customer customer = mapper.convertValue(customerData, Customer.class);
|
||||
|
||||
if (Operation.DELETE.name().equals(operation.name())) {
|
||||
if (Operation.DELETE == operation) {
|
||||
customerRepository.deleteById(customer.getId());
|
||||
} else {
|
||||
customerRepository.save(customer);
|
||||
|
|
Loading…
Reference in New Issue