diff options
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/main/java')
-rw-r--r-- | bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java index 4e0b5634ea..477d3c65db 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java @@ -86,7 +86,6 @@ import com.fasterxml.jackson.databind.type.TypeFactory; public class BBInputSetupUtils { private static final Logger logger = LoggerFactory.getLogger(BBInputSetupUtils.class); - private ObjectMapper objectMapper = new ObjectMapper(); private static final String REQUEST_ERROR = "Could not find request."; private static final String DATA_LOAD_ERROR = "Could not process loading data from database"; private static final String DATA_PARSE_ERROR = "Could not parse data"; @@ -189,7 +188,8 @@ public class BBInputSetupUtils { request.getOriginalRequestId(), PROCESSING_DATA_NAME_EXECUTION_FLOWS); try { ObjectMapper om = new ObjectMapper(); - TypeFactory typeFactory = objectMapper.getTypeFactory(); + TypeFactory typeFactory = om.getTypeFactory(); + om.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); return om.readValue(requestProcessingData.getValue(), typeFactory.constructCollectionType(List.class, ExecuteBuildingBlock.class)); } catch (Exception e) { @@ -245,6 +245,8 @@ public class BBInputSetupUtils { if (requestId != null && !requestId.isEmpty()) { InfraActiveRequests activeRequest = this.getInfraActiveRequest(requestId); String requestBody = activeRequest.getRequestBody().replaceAll("\\\\", ""); + ObjectMapper objectMapper = new ObjectMapper(); + objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); objectMapper.configure(SerializationFeature.WRAP_ROOT_VALUE, true); objectMapper.configure(DeserializationFeature.UNWRAP_ROOT_VALUE, true); return objectMapper.readValue(requestBody, RequestDetails.class); |