Skip to content

Commit

Permalink
BWC
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey Ershov committed May 24, 2019
1 parent 0e956ae commit 71f6aa1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ public void writeTo(StreamOutput out) throws IOException {
if (out.getVersion().onOrAfter(MULTIPLE_REPOSITORIES_SUPPORT_ADDED)) {
out.writeStringArray(repositories);
} else {
if (repositories.length != 1) {
throw new IllegalArgumentException("Requesting snapshots from multiple repositories is not supported in versions prior " +
"to " + MULTIPLE_REPOSITORIES_SUPPORT_ADDED.toString());
}
out.writeString(repositories[0]);
}
out.writeStringArray(snapshots);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,8 @@ public void writeTo(StreamOutput out) throws IOException {
}
} else {
if (successfulResponses.size() + failedResponses.size() != 1) {
throw new IllegalArgumentException("snapshots from more than one repository are requested");
throw new IllegalArgumentException("Requesting snapshots from multiple repositories is not supported in versions prior " +
"to " + GetSnapshotsRequest.MULTIPLE_REPOSITORIES_SUPPORT_ADDED.toString());
}

if (successfulResponses.size() == 1) {
Expand Down

0 comments on commit 71f6aa1

Please sign in to comment.