File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
server/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/get Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -107,6 +107,8 @@ public GetSnapshotsResponse(Collection<Response> responses) {
107107 this .failedResponses .put (response .repository , response .error );
108108 }
109109 }
110+ successfulResponses = Collections .unmodifiableMap (successfulResponses );
111+ failedResponses = Collections .unmodifiableMap (failedResponses );
110112 }
111113
112114 public GetSnapshotsResponse () {
@@ -142,14 +144,14 @@ public Set<String> getRepositories() {
142144 * Returns a map of repository name to the list of {@link SnapshotInfo} for each successful response.
143145 */
144146 public Map <String , List <SnapshotInfo >> getSuccessfulResponses () {
145- return Map . copyOf ( successfulResponses ) ;
147+ return successfulResponses ;
146148 }
147149
148150 /**
149151 * Returns a map of repository name to {@link ElasticsearchException} for each unsuccessful response.
150152 */
151153 public Map <String , ElasticsearchException > getFailedResponses () {
152- return Map . copyOf ( failedResponses ) ;
154+ return failedResponses ;
153155 }
154156
155157 /**
You can’t perform that action at this time.
0 commit comments