metron-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mmiklavc <...@git.apache.org>
Subject [GitHub] metron pull request #910: METRON-1430: Isolate jackson from being used as ar...
Date Thu, 25 Jan 2018 20:51:45 GMT
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?


---

Mime
View raw message