[
https://issues.apache.org/jira/browse/METRON-1430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16339860#comment-16339860
]
ASF GitHub Bot commented on METRON-1430:
----------------------------------------
Github user mmiklavc commented on a diff in the pull request:
https://github.com/apache/metron/pull/910#discussion_r163962696
--- Diff:
metron-platform/metron-indexing/src/main/java/org/apache/metron/indexing/dao/IndexDao.java
---
@@ -140,9 +147,9 @@ default Document getPatchedDocument(PatchRequest request
throw new OriginalNotFoundException("Unable to patch an document
that doesn't exist and isn't specified.");
}
}
- JsonNode originalNode = JSONUtils.INSTANCE.convert(latest,
JsonNode.class);
- JsonNode patched = JSONUtils.INSTANCE.applyPatch(request.getPatch(),
originalNode);
- Map<String, Object> updated = JSONUtils.INSTANCE.getMapper()
+ JsonNode originalNode = _mapper.get().convertValue(latest,
JsonNode.class);
+ JsonNode patched = JsonPatch.apply(request.getPatch(), originalNode);
+ Map<String, Object> updated = _mapper.get()
.convertValue(patched, new TypeReference<Map<String, Object>>()
{});
--- End diff --
JSONUtils.MAP_SUPPLIER here?
> Isolate jackson from being used as arguments or returns from JSONUtils
> ----------------------------------------------------------------------
>
> Key: METRON-1430
> URL: https://issues.apache.org/jira/browse/METRON-1430
> Project: Metron
> Issue Type: Improvement
> Reporter: Casey Stella
> Priority: Major
>
> Currently jackson is used as part of our internal API to JSONUtils. The
> problem here is when we shade and relocate jackson. Suddenly we can't use
> JSONUtils. We should avoid operating on jackson primitives and rather
> provide a convenient wrapper around the places where we use jackson as part
> of the API.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)