Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

SOLR-16511: Fix key in AbstractIncrementalBackupTest.corruptIndexFiles

Kevin Risden2d3aa07b9e3c
diff --git a/solr/test-framework/src/java/org/apache/solr/cloud/api/collections/AbstractIncrementalBackupTest.java b/solr/test-framework/src/java/org/apache/solr/cloud/api/collections/AbstractIncrementalBackupTest.java
index c719d4988bf..9af8553dd5c 100644
--- a/solr/test-framework/src/java/org/apache/solr/cloud/api/collections/AbstractIncrementalBackupTest.java
+++ b/solr/test-framework/src/java/org/apache/solr/cloud/api/collections/AbstractIncrementalBackupTest.java
@@ -366,7 +366,7 @@ public abstract class AbstractIncrementalBackupTest extends SolrCloudTestCase {
try (FileInputStream fis = new FileInputStream(fileGetCorrupted)) {
byte[] contents = fis.readAllBytes();
for (int i = 1; i < 5; i++) {
- byte key = (byte) (contents.length - CodecUtil.footerLength() - i);
+ int key = contents.length - CodecUtil.footerLength() - i;
contents[key] = (byte) (contents[key] + 1);
}
try (FileOutputStream fos = new FileOutputStream(fileGetCorrupted)) {