-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Change signature of Get Repositories Response #30333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -75,9 +75,9 @@ protected void masterOperation(final GetRepositoriesRequest request, ClusterStat | |
| RepositoriesMetaData repositories = metaData.custom(RepositoriesMetaData.TYPE); | ||
| if (request.repositories().length == 0 || (request.repositories().length == 1 && "_all".equals(request.repositories()[0]))) { | ||
| if (repositories != null) { | ||
| listener.onResponse(new GetRepositoriesResponse(repositories.repositories())); | ||
| listener.onResponse(new GetRepositoriesResponse(new RepositoriesMetaData(repositories.repositories()))); | ||
| } else { | ||
| listener.onResponse(new GetRepositoriesResponse(Collections.<RepositoryMetaData>emptyList())); | ||
| listener.onResponse(new GetRepositoriesResponse(new RepositoriesMetaData(Collections.<RepositoryMetaData>emptyList()))); | ||
|
||
| } | ||
| } else { | ||
| if (repositories != null) { | ||
|
|
@@ -102,7 +102,7 @@ protected void masterOperation(final GetRepositoriesRequest request, ClusterStat | |
| } | ||
| repositoryListBuilder.add(repositoryMetaData); | ||
| } | ||
| listener.onResponse(new GetRepositoriesResponse(Collections.unmodifiableList(repositoryListBuilder))); | ||
| listener.onResponse(new GetRepositoriesResponse(new RepositoriesMetaData((repositoryListBuilder)))); | ||
|
||
| } else { | ||
| listener.onFailure(new RepositoryMissingException(request.repositories()[0])); | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -79,7 +79,7 @@ protected Table getTableWithHeader(RestRequest request) { | |
|
|
||
| private Table buildTable(RestRequest req, GetRepositoriesResponse getRepositoriesResponse) { | ||
| Table table = getTableWithHeader(req); | ||
| for (RepositoryMetaData repositoryMetaData : getRepositoriesResponse.repositories()) { | ||
| for (RepositoryMetaData repositoryMetaData : getRepositoriesResponse.repositories().repositories()) { | ||
|
||
| table.startRow(); | ||
|
|
||
| table.addCell(repositoryMetaData.name()); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is a new RepositoriesMetaData created instead of using the existing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wow that was silly. good catch.