Skip to content

Commit

Permalink
DGS-7446 Fix perf regression due to DGS-6331 (#2693)
Browse files Browse the repository at this point in the history
  • Loading branch information
rayokota committed Jul 8, 2023
1 parent ca004d0 commit 095f6cd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,10 @@ public String name() {
return getString("title");
}

public boolean has(String key) {
return jsonNode.has(key);
}

public String getString(String key) {
return jsonNode.has(key) ? jsonNode.get(key).asText() : null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ protected Object deserialize(
: objectMapper.readValue(buffer.array(), start, length, type);
} else {
String typeName;
if (schema.rawSchema() instanceof CombinedSchema) {
if (schema.has("oneOf") || schema.has("anyOf") || schema.has("allOf")) {
if (jsonNode == null) {
jsonNode = objectMapper.readValue(buffer.array(), start, length, JsonNode.class);
}
Expand Down

0 comments on commit 095f6cd

Please sign in to comment.