Refactoring - Version stable
This commit is contained in:
@@ -47,7 +47,8 @@ public class ApprovalResource {
|
||||
try {
|
||||
String transactionId = (String) request.get("transactionId");
|
||||
String transactionType = (String) request.get("transactionType");
|
||||
Double amount = ((Number) request.get("amount")).doubleValue();
|
||||
Number rawAmount = (Number) request.get("amount");
|
||||
Double amount = rawAmount != null ? rawAmount.doubleValue() : null;
|
||||
String organizationIdStr = (String) request.get("organizationId");
|
||||
|
||||
if (transactionId == null || transactionType == null || amount == null) {
|
||||
|
||||
Reference in New Issue
Block a user