Skip to content

Commit

Permalink
innerToXContent compilation fix
Browse files Browse the repository at this point in the history
  • Loading branch information
albertzaharovits committed Jun 7, 2024
1 parent 37edae7 commit f87b2ff
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public record Item(RoleDescriptor roleDescriptor, @Nullable Object[] sortValues)
@Override
public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
builder.startObject();
roleDescriptor.innerToXContent(builder, params, false);
roleDescriptor.innerToXContent(builder, params, false, false);
if (sortValues != null && sortValues.length > 0) {
builder.array("_sort", sortValues);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,13 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params, boolea
return toXContent(builder, params, docCreation, false);
}

public XContentBuilder toXContent(XContentBuilder builder, Params params, boolean docCreation, boolean includeMetadataFlattened)
throws IOException {
builder.startObject();
innerToXContent(builder, params, docCreation, includeMetadataFlattened);
return builder.endObject();
}

/**
* Generates x-content for this {@link RoleDescriptor} instance.
*
Expand All @@ -432,7 +439,7 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params, boolea
* @return x-content builder
* @throws IOException if there was an error writing the x-content to the builder
*/
public XContentBuilder toXContent(XContentBuilder builder, Params params, boolean docCreation, boolean includeMetadataFlattened)
public XContentBuilder innerToXContent(XContentBuilder builder, Params params, boolean docCreation, boolean includeMetadataFlattened)
throws IOException {
builder.startObject();
builder.array(Fields.CLUSTER.getPreferredName(), clusterPrivileges);
Expand Down

0 comments on commit f87b2ff

Please sign in to comment.