Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
go0sedev authored Dec 20, 2023
1 parent 49146e0 commit 4f5ad41
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -435,13 +435,12 @@ public IndexMetadata getIndexMetadata(String index)

return doRequest(path, body -> {
try {

JsonNode elements = OBJECT_MAPPER.readTree(body).elements();
if (!elements.hasNext()) {
JsonNode treeElements = OBJECT_MAPPER.readTree(body).elements();
if (!treeElements.hasNext()) {
return new IndexMetadata(new IndexMetadata.ObjectType(ImmutableList.of()));
}

JsonNode mappings = .next().get("mappings");
JsonNode mappings = treeElements.next().get("mappings");
if (!mappings.elements().hasNext()) {
return new IndexMetadata(new IndexMetadata.ObjectType(ImmutableList.of()));
}
Expand Down

0 comments on commit 4f5ad41

Please sign in to comment.