Skip to content

Commit 45e5df8

Browse files
authored
Merge pull request #250 from sxci/etag_overfllow
(int)long/int ===> (int)(long/int) [ci skip]
2 parents 8860efb + eee7adb commit 45e5df8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/qiniu/util/Etag.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public static String stream(InputStream in, long len) throws IOException {
7878
return "Fto5o-5ea0sNMlW_75VgGJCv2AcJ";
7979
}
8080
byte[] buffer = new byte[64 * 1024];
81-
byte[][] blocks = new byte[(int) (len + Constants.BLOCK_SIZE - 1) / Constants.BLOCK_SIZE][];
81+
byte[][] blocks = new byte[(int) ((len + Constants.BLOCK_SIZE - 1) / Constants.BLOCK_SIZE)][];
8282
for (int i = 0; i < blocks.length; i++) {
8383
long left = len - (long) Constants.BLOCK_SIZE * i;
8484
long read = left > Constants.BLOCK_SIZE ? Constants.BLOCK_SIZE : left;

0 commit comments

Comments
 (0)