Skip to content

Commit b9b8075

Browse files
committed
Remove reader function from method signature
Signed-off-by: Sooraj Sinha <soosinha@amazon.com>
1 parent 63e28d4 commit b9b8075

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

server/src/main/java/org/opensearch/repositories/blobstore/ChecksumWritableBlobStoreFormat.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public void close() throws IOException {
8484
}
8585
}
8686

87-
public T deserialize(String blobName, CheckedFunction<StreamInput, T, IOException> reader, BytesReference bytes) throws IOException {
87+
public T deserialize(String blobName, BytesReference bytes) throws IOException {
8888
final String resourceDesc = "ChecksumBlobStoreFormat.readBlob(blob=\"" + blobName + "\")";
8989
try {
9090
final IndexInput indexInput = bytes.length() > 0

server/src/test/java/org/opensearch/repositories/blobstore/ChecksumWritableBlobStoreFormatTests.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public class ChecksumWritableBlobStoreFormatTests extends OpenSearchTestCase {
3636
public void testSerDe() throws IOException {
3737
IndexMetadata indexMetadata = getIndexMetadata();
3838
BytesReference bytesReference = clusterBlocksFormat.serialize(indexMetadata, TEST_BLOB_FILE_NAME, CompressorRegistry.none());
39-
IndexMetadata readIndexMetadata = clusterBlocksFormat.deserialize(TEST_BLOB_FILE_NAME, IndexMetadata::readFrom, bytesReference);
39+
IndexMetadata readIndexMetadata = clusterBlocksFormat.deserialize(TEST_BLOB_FILE_NAME, bytesReference);
4040
assertThat(readIndexMetadata, is(indexMetadata));
4141
}
4242

@@ -47,7 +47,7 @@ public void testSerDeForCompressed() throws IOException {
4747
TEST_BLOB_FILE_NAME,
4848
CompressorRegistry.getCompressor(DeflateCompressor.NAME)
4949
);
50-
IndexMetadata readIndexMetadata = clusterBlocksFormat.deserialize(TEST_BLOB_FILE_NAME, IndexMetadata::readFrom, bytesReference);
50+
IndexMetadata readIndexMetadata = clusterBlocksFormat.deserialize(TEST_BLOB_FILE_NAME, bytesReference);
5151
assertThat(readIndexMetadata, is(indexMetadata));
5252
}
5353

0 commit comments

Comments
 (0)