From 32264e69dc47ce5b6a5a25554dd207ebc5ecbed3 Mon Sep 17 00:00:00 2001 From: Raj Shah Date: Mon, 16 Oct 2023 16:39:03 +0530 Subject: [PATCH] Removed extra semicolons --- .../GetSalesforceAccountEventDetails.java | 15 ++++++++------- .../GetSalesforceAccountEventsList.java | 1 - .../GetSalesforceAccountTaskDetails.java | 5 ++--- .../GetSalesforceAccountTasksList.java | 1 - 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/salessparrow/api/lib/crmActions/getAccountEventDetails/GetSalesforceAccountEventDetails.java b/src/main/java/com/salessparrow/api/lib/crmActions/getAccountEventDetails/GetSalesforceAccountEventDetails.java index a32eae5b..7a29d623 100644 --- a/src/main/java/com/salessparrow/api/lib/crmActions/getAccountEventDetails/GetSalesforceAccountEventDetails.java +++ b/src/main/java/com/salessparrow/api/lib/crmActions/getAccountEventDetails/GetSalesforceAccountEventDetails.java @@ -91,15 +91,16 @@ public GetEventDetailsFormatterDto parseResponse(String responseBody) { } JsonNode recordsNode = rootNode.get("compositeResponse").get(0).get("body").get("records"); - ; EventEntity eventEntity = new EventEntity(); - for (JsonNode recordNode : recordsNode) { - ObjectMapper mapper = new ObjectMapper(); - mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); - SalesforceGetEventsListDto salesforceGetEventsListDto = mapper.convertValue(recordNode, - SalesforceGetEventsListDto.class); - eventEntity = salesforceGetEventsListDto.eventEntity(); + if (recordsNode.size() > 0) { + for (JsonNode recordNode : recordsNode) { + ObjectMapper mapper = new ObjectMapper(); + mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); + SalesforceGetEventsListDto salesforceGetEventsListDto = mapper.convertValue(recordNode, + SalesforceGetEventsListDto.class); + eventEntity = salesforceGetEventsListDto.eventEntity(); + } } GetEventDetailsFormatterDto getEventDetailsFormatterDto = new GetEventDetailsFormatterDto(); diff --git a/src/main/java/com/salessparrow/api/lib/crmActions/getAccountEventsList/GetSalesforceAccountEventsList.java b/src/main/java/com/salessparrow/api/lib/crmActions/getAccountEventsList/GetSalesforceAccountEventsList.java index 4e1ae8ab..6802ffcf 100644 --- a/src/main/java/com/salessparrow/api/lib/crmActions/getAccountEventsList/GetSalesforceAccountEventsList.java +++ b/src/main/java/com/salessparrow/api/lib/crmActions/getAccountEventsList/GetSalesforceAccountEventsList.java @@ -98,7 +98,6 @@ public GetEventsListFormatterDto parseResponse(String responseBody) { } JsonNode recordsNode = rootNode.get("compositeResponse").get(0).get("body").get("records"); - ; for (JsonNode recordNode : recordsNode) { ObjectMapper mapper = new ObjectMapper(); diff --git a/src/main/java/com/salessparrow/api/lib/crmActions/getAccountTaskDetails/GetSalesforceAccountTaskDetails.java b/src/main/java/com/salessparrow/api/lib/crmActions/getAccountTaskDetails/GetSalesforceAccountTaskDetails.java index 8fff05b5..f269ec86 100644 --- a/src/main/java/com/salessparrow/api/lib/crmActions/getAccountTaskDetails/GetSalesforceAccountTaskDetails.java +++ b/src/main/java/com/salessparrow/api/lib/crmActions/getAccountTaskDetails/GetSalesforceAccountTaskDetails.java @@ -91,13 +91,12 @@ public GetTaskDetailsFormatterDto parseResponse(String responseBody) { } JsonNode recordsNode = rootNode.get("compositeResponse").get(0).get("body").get("records"); - ; TaskEntity taskEntity = new TaskEntity(); if (recordsNode.size() > 0) { + ObjectMapper mapper = new ObjectMapper(); + mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); for (JsonNode recordNode : recordsNode) { - ObjectMapper mapper = new ObjectMapper(); - mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); SalesforceGetTasksListDto salesforceGetTasksListDto = mapper.convertValue(recordNode, SalesforceGetTasksListDto.class); taskEntity = salesforceGetTasksListDto.taskEntity(); diff --git a/src/main/java/com/salessparrow/api/lib/crmActions/getAccountTasksList/GetSalesforceAccountTasksList.java b/src/main/java/com/salessparrow/api/lib/crmActions/getAccountTasksList/GetSalesforceAccountTasksList.java index 5d29e90d..24bc2a27 100644 --- a/src/main/java/com/salessparrow/api/lib/crmActions/getAccountTasksList/GetSalesforceAccountTasksList.java +++ b/src/main/java/com/salessparrow/api/lib/crmActions/getAccountTasksList/GetSalesforceAccountTasksList.java @@ -98,7 +98,6 @@ public GetTasksListFormatterDto parseResponse(String responseBody) { } JsonNode recordsNode = rootNode.get("compositeResponse").get(0).get("body").get("records"); - ; for (JsonNode recordNode : recordsNode) { ObjectMapper mapper = new ObjectMapper();