Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

SO-4891: multi-value expand parameter support #855

Merged
merged 2 commits into from
Jul 16, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix(api): check for null/empty values before joining expand values
  • Loading branch information
cmark committed Jul 16, 2021

Verified

This commit was signed with the committer’s verified signature.
schroda schroda
commit 8bd02e1cf890ded55cb5e72a4479d79413e5ee9f
Original file line number Diff line number Diff line change
@@ -35,11 +35,17 @@ public abstract class IndexResourceRequestBuilder<B extends IndexResourceRequest
protected IndexResourceRequestBuilder() {}

public final B setExpand(String...expand) {
return setExpand(String.join(",", expand));
if (!CompareUtils.isEmpty(expand)) {
return setExpand(String.join(",", expand));
}
return getSelf();
}

public final B setExpand(List<String> expand) {
return setExpand(String.join(",", expand));
if (!CompareUtils.isEmpty(expand)) {
return setExpand(String.join(",", expand));
}
return getSelf();
}

public final B setExpand(String expand) {