File tree 1 file changed +2
-2
lines changed
server/src/test/java/org/elasticsearch/repositories/blobstore
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ protected void onFailure() {
79
79
while (written < bytesToWrite ) {
80
80
if (randomBoolean ()) {
81
81
random ().nextBytes (buffer );
82
- final int offset = randomInt (buffer .length - 2 ) + 1 ;
82
+ final int offset = randomInt (buffer .length - 1 ) ;
83
83
final int length = Math .toIntExact (Math .min (bytesToWrite - written , buffer .length - offset ));
84
84
stream .write (buffer , offset , length );
85
85
checksumIn .update (buffer , offset , length );
@@ -133,7 +133,7 @@ protected void onFailure() {
133
133
break ;
134
134
} else if (randomBoolean ()) {
135
135
random ().nextBytes (buffer );
136
- final int offset = randomInt (buffer .length - 2 ) + 1 ;
136
+ final int offset = randomInt (buffer .length - 1 ) ;
137
137
final int length = Math .toIntExact (Math .min (bytesToWrite - written , buffer .length - offset ));
138
138
stream .write (buffer , offset , length );
139
139
written += length ;
You can’t perform that action at this time.
0 commit comments